Forum Moderators: phranque

Message Too Old, No Replies

My 404 page returns a status of 200.

         

Linda_A

11:43 am on Oct 14, 2006 (gmt 0)

10+ Year Member



I recently decided to try out Google's Webmaster tools for my sites, and I have found that I am unable to verify the sites because Google says that my 404 page returns a status of 200.

How should I be setting up my 404 to get it to return the proper status code? My .htaccess pointing to my custom 404 (and 403) looks like this:

ErrorDocument 403 [domain.com...]
ErrorDocument 404 [domain.com...]

Alex_TJ

12:13 pm on Oct 14, 2006 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hi Linda,

I had the same problem a while ago. What worked for me was removing the absolute link and putting instead /error404.htm.
However, it still doesn't work for my subdomains, and when I tried to create another .htaccess file for the subdomain it overwrote the domain version...!

Hope that works for you anyway,
Alex

FalseDawn

12:26 pm on Oct 14, 2006 (gmt 0)

10+ Year Member



Use relative paths, eg:

ErrorDocument 403 /403.html
ErrorDocument 404 /404.html

pixeltierra

5:05 pm on Oct 15, 2006 (gmt 0)

10+ Year Member



Is it possible with this htaccess method to have access to the file that was not found in the error page.

I currently have a 404 php page that does some directory searching for possible files on the server that could match the missing page. How couuld I use apache to get the broken link?