我有ang 404代码,如果找不到页面,将会重定向到该网站。它在firefox中正常工作。但是,当我使用Internet Explorer v6时。该网站将获得和错误措施:“HTTP 404 - 文件未找到Internet Explore”。我怎样才能解决这个问题?任何帮助表示赞赏
由于
答案 0 :(得分:13)
尝试使用更长的404页面。那不是开玩笑。如果我记得错误,如果404页面小于512b,IE将介入并显示自己的错误消息。
添加一些评论即可。
参考:http://www.reddit.com/r/web_design/comments/ee4zc/so_i_looked_at_plesks_404_page/
为了完整性:
<HTML>
<HEAD>
<TITLE>404 Not Found</TITLE>
</HEAD>
<BODY>
<H1>Not Found</H1>
The requested document was not found on this server.
<P>
<HR>
<ADDRESS>
Web Server at example.com
</ADDRESS>
</BODY>
</HTML>
<!--
- Unfortunately, Microsoft has added a clever new
- "feature" to Internet Explorer. If the text of
- an error's message is "too small", specifically
- less than 512 bytes, Internet Explorer returns
- its own error message. You can turn that off,
- but it's pretty tricky to find switch called
- "smart error messages". That means, of course,
- that short error messages are censored by default.
- IIS always returns error messages that are long
- enough to make Internet Explorer happy. The
- workaround is pretty simple: pad the error
- message with a big comment like this to push it
- over the five hundred and twelve bytes minimum.
- Of course, that's exactly what you're reading
- right now.
-->