gpt4 book ai didi

javascript - 我网站上非常奇怪的禁止错误

转载 作者:太空狗 更新时间:2023-10-29 14:23:39 26 4
gpt4 key购买 nike

我一直在创建指向我的网站子文件夹的链接,但文件 index.html 不存在(例如 example.com/london/en/ 期望它加载默认值文件夹 example.com/london/en/index.html 中的页面)但是我得到的页面只是简单地写着 forbidden

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

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

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

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

最佳答案

您的服务器是 Windows 还是 Linux?

禁止 = 许可。

在 Linux 中输入:

chmod 777 index.html
chmod 777 confirmation.html

更新

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

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

关于javascript - 我网站上非常奇怪的禁止错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30978163/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com