site  contact  subhomenews

Error handling for news directory

April 11, 2008 — BarryK
The URL puppylinux.com/news/ 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 puppylinux.com/news/index.html

To test, go to this randomURL:
http://puppylinux.com/news/viewtopic.php?page=66

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

UPDATE:

Comments

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. http://www.askapache.com/htaccess/seo-search-engine-friendly-redirects-without-mod_rewrite.html#seo-301-redirect-single-file


Tags: puppy