Forum Moderators: phranque

Message Too Old, No Replies

htaccess redirection of 404 doesn't work from Apache to IE6

         

lovequiet

10:02 pm on Aug 31, 2006 (gmt 0)

10+ Year Member



Newbie here. Search didn't disclose what's might be going on.

I have used htaccess file to redirect unfound pages like
www.mywebsite.com/#*$!/yyy
to a custom page which will interpret the #*$! and yy as parameters to send to php

My htaccess just says:
ErrorDocument 404 /index.php

This works fine to send all unfound pages back to home (index.php) page... in FireFox, etc.
But not it IE6.
IE6 continues to display "The page cannot be found".

Can anyone explain what I need to do to get IE to display what Apache is (according to FF, Safari, etc.) serving up?

Many thanks!

Alll this happens just with the redirection of pages - before any php run... so I don't think php should be relevant, but FYI, here is what phpinfo says:
_SERVER["ORIG_SCRIPT_FILENAME"]/dh/cgi-system/php5.cgi

lovequiet

1:42 am on Sep 1, 2006 (gmt 0)

10+ Year Member



FWIW:
I did make sure that the existing 404.html and 404.php files were well over 512 bytes...
even though I haven't heard that that should matter when the .htaccess is redirecting.

(Is my problem too obvious to get a reply? Or can no one conceive that this happens?)

jdMorgan

1:46 am on Sep 1, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



1) Turn off "Show Friendly HTTP Error Pages [support.microsoft.com] in Internet Options. See also Description of Hypertext Transport Protocol Error Messages [support.microsoft.com]
2) Make sure your error page output from index.php exceeds 512 bytes.
3) Flush your browser cache after any change to your server config.

Note that a better approach for handling missing pages may be to serve a page explaining that the requested page is missing, and provide a link to your site map, search page, and/or index page. This prevents the missing pages from being seen as doorway pages or duplicate content, either of which may affect your pages' rankings, and is a better approach to site usability than a sudden and unexpected redirect to the home page.

Also, you may wish to consider returning a 410-Gone response to intentionally-removed page requests if the requests are made with HTTP/1.1. HTTP/1.1 added support for this response code, enabling you to declare that the page was intentionally removed (and won't be back), as opposed to the ambiguous 404-Not Found response, which may mean either that the page has been removed or that a server problem is causing it to be temporarily inaccessible.

Jim

lovequiet

2:39 am on Sep 1, 2006 (gmt 0)

10+ Year Member



Thanks Jim,
Didn't know enough to dig down and find the "delete files" button in "internet options" (I know... shows I'm a Mac user). Strange, tho, that no other browser Mac or Windows requires it.
Working smoothly now.
I'll be generating a custom page for non-existent pages -- I wanted this redirection to allow me to pass page-rendering parameters in the URL without "?param=#*$!"