Proper use of 410 gone .htaccess redirect

Being a web developer, I want everything right and proper.

That includes listing pages I knowingly deleted with 410 gone error code.

 

Proper use:

in your .htaccess file, add:

redirect gone /subfolder_or_not/title.html

or

redirect 410 /subfolder_or_not/titleurl.html

 

Where two different use examples are given, and they are identical in functionality.

Upon visiting those URLs, a visitor will see a very bland error page.

For the visitor to see a more pleasing and informative page (one that perhaps searches for similarly titled articles, or gives a sitemap, contact form, and main website navigation).

a) Create a page first and note its URL.

b) after those redirect lines in your .htaccess file, add

ErrorDocument 410 /410-error-page.html

Where the URL can be any URL that you have created your page with.

For an example, see http://mkrd.info/faq-qa.html

 

Just to disclose everything, I don't know how exactly an indexer (or a bot) would know that an error page was returned. And whether it would know to immediately remove that page from its index. Perhaps Apache takes care of that. If you are a guru, and you know for sure, then email me.

 

After each htaccess change, do not forget to do the following: clear CMS cache, clear browser cache, press ctrl+F5, and after page reloads, try your address query again.

 

Further reading:

http://diveintomark.org/archives/2003/03/27/http_error_410_gone

http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html

http://www.askapache.com/htaccess/apache-status-code-headers-errordocument.html



˅˅˅ Additional valuable information is available at one of the links below: ˅˅˅

 

Did you like the article? Let Google Search know by clicking this button: . Please link to content that you find useful on this website on your own website, forum or blog! You can also comment on this page below, or to ask a question or suggest a topic for me to research. There is a user-editable Wiki available on my website, as well as a Forum that you can contribute to. Site Map.

Page last modified 02-Oct-11 01:26:30 EDT
Comments on this page:


Add a comment to this page
Comment Title:
Your Name:
Your Email Address:
Notify me of new comments to this item:
Additional Comments:
This is a captcha-picture. It is used to prevent mass-access by robots. (see: www.captcha.net)