Forum Moderators: phranque

Message Too Old, No Replies

Generating a 410 code

410 error code

         

reggy

11:04 pm on Apr 17, 2008 (gmt 0)

10+ Year Member



I have deleted a no of posts from my blog and i would like the SEs to know that each of those pages is gone forever(410) instead of them getting a 404 error message

Please could you give me the code i can include in my .htaccess file for this to work

Thanks is advance!

jdMorgan

11:19 pm on Apr 17, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



This is generally done by using the [G] flag on a RewriteRule. See the Apache mod_rewrite documentation.

You should also check for a "Host:" header in the client request to be sure that the client can handle a 410 response; HTTP/1.0 clients can't handle a 410, and do not send a Host: header with their requests.

You might also wish to review our forum charter [webmasterworld.com] for information about how to get the most from this forum.

Post your best-effort code if you have any problems.

Thanks,
Jim