site  contact  subhomenews

Error handling for news directory

April 11, 2008 — BarryK
The URL used to have a Simplephpblog blog in it, and I see from the access and error logs that there are many attempts to access entries in the non-existent blog.

So, I created a news/.htaccess file with an 'ErrorDocument' entry to redirect all '404' server errors (file not found) to

To test, go to this randomURL:

The thing is though, will search engines then know the the invalid URL is in fact invalid, and stop using it?



issue a 301 using htaccess
Username: hairywill
In this situation you should serve an http 301 error message that tells the user agent where the page has been permanently been moved to. This link contains instructions on how to do this using htaccess. I cannot vouch for its accuracy as it is not something I have ever tried.

Tags: puppy