【问题标题】:Very strange forbidden error on my website我的网站上非常奇怪的禁止错误
【发布时间】:2015-09-07 19:10:39
【问题描述】:

我一直在创建指向我的网站子文件夹的链接,但文件 index.html 不存在(例如 example.com/london/en/ 期望它加载文件夹 example.com/london/en/index.html 中的默认页面)但是我得到的页面只是显示 @ 987654326@。

经过各种测试,我发现当您在最后输入带有 index.html 的 URL 时,页面加载正常。我还发现它适用于不同的 html 页面。所以这让我相信问题出在那个特定的 html 页面中。

最终我将错误缩小到这行代码:

<iframe name="hidden_iframe" id="hidden_iframe" style="display:none;"  onload="if(submitted) {window.location='confirmation.html';}"></iframe>

我发现当样式标签被移除并移动到我们拥有的 CSS 文件时,它加载得非常好。但我不知道为什么这个解决方案有效!我没有太多编程经验,所以也许这里有人现在可以吗?

【问题讨论】:

  • 风格不是被弃用了吗?使用 CSS。
  • style 属性未被弃用。
  • @jyoon - doesn't look like it,我很确定 style 包含 CSS。此外,这不会导致 OP 遇到的问题。
  • @Sunil - 如果您尝试删除 onload 属性会怎样?
  • 为什么有tag作为属性?

标签: javascript jquery html css iframe


【解决方案1】:

我怀疑您没有浏览该文件夹的权限。尝试在该文件夹中指定一个文件。

【讨论】:

  • 但是当我移动 style="display:none;"到一个单独的 css 文件
【解决方案2】:

您的服务器是 Windows 还是 Linux?

禁止 = 许可。

在linux中输入:

chmod 777 index.html
chmod 777 confirmation.html

更新

在您的 www/ 中创建或更新 .htaccess 文件

<Directory /en>
Allow from all
</Directory>

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2011-01-18
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-08-23
    • 2014-04-15
    相关资源
    最近更新 更多