2010-12-16 31 views
2

ページが見つからない場合は、サイトにリダイレクトするang 404コードがあります。それは適切にFirefoxで動作します。しかし、私はInternet Explorer v6を使用します。サイトは「HTTP 404 - ファイルが見つからないインターネットエクスプローラ」というエラーメッセージを表示します。これをどうすれば解決できますか?任意のヘルプが評価されますHTTP 404 - ファイルが見つかりませんInternet Explorer V6

ありがとう

+2

だから、私たちはテレパシー球を取り、あなたの心から直接コードを読み取るために必要なのですか? – zerkms

答えて

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. 
    --> 
+0

ああ、まあ、これを見たことがない、私のコードで同じコメントを行に沿って使ったことさえある。 – Scuzzy

+0

MYYN、私はそれを試しましたが、それは動作しません。それは全くリダイレ​​クトされません – rayss

+0

私はそれを修正したと思います。私は404.phpを次のように書き直します:header( "Location:http://www.yoursite.com");/*リダイレクトブラウザ*/ /*リダイレクト時に以下のコードが実行されないことを確認してください。 */ exit; – rayss

関連する問題