404页面以纯文本显示(iis7)
大家好,
我的自定义 404 页面有问题。 域名.com/lalala ->以纯文本形式显示 404 页面 域名.com/lalala.html ->正确显示页面
该问题在 Internet Explorer 中不存在,仅在 Firefox/Chrome 中存在。
我认为这一切都与哑剧类型有关。我尝试添加 mime 类型规则: .* -> text/html 但没有结果。
顺便说一句,它托管一个 sharepoint 2007 站点。
有人建议吗? 总氮
Heey all,
I have a problem with my custom 404 page.
domain.com/lalala -> displays the 404 page in plain text
domain.com/lalala.html -> displays the page correctly
The problem is not present in Internet Explorer, but only in Firefox/Chrome.
I think this all has something to do with mime types. I tried add a mime type rule:
.* -> text/html but no result.
By the way, it hosts a sharepoint 2007 site.
Anyone suggestions?
Tnx
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我为您做了一些探索,一致认为这是在 Sharepoint 中由默认 Sharepoint 404 文件中的无效和不可见字符引起的。解决方案似乎是从头开始重新创建 404 页面(不要复制/粘贴),覆盖,然后重试。
IE 通常比 FF 或 Chrome 对内容类型标头更宽容,所以我对它在那里工作并不感到惊讶。
I did some poking around for you, and the consensus seems to be that this is caused in Sharepoint by invalid and invisible characters in the default Sharepoint 404 file. The solution seems to be to recreate a 404 page from scratch (don't copy/paste), overwrite, and try again.
IE is generally more forgiving about the content-type header than FF or Chrome, so I'm not surprised it works there.