homepage Welcome to WebmasterWorld Guest from
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
Forum Library, Charter, Moderators: Ocean10000 & incrediBILL & phranque

Apache Web Server Forum

410 gone for entire domain with custom 410

 3:49 pm on Dec 4, 2012 (gmt 0)

I want to do a 410 gone for an entire domain, using a custom 410 gone doc.

Since the 410 gone error doc has to be on the same domain to work properly, of course I hit a snag using something simple like:

ErrorDocument 410 /410.htm
redirect gone /

Since this is a wordpress installation set up not to use file suffixes, I can't do it that way either.

Any thoughts?



 8:53 pm on Dec 4, 2012 (gmt 0)

If you're yanking the whole domain, why don't you also delete the htaccess that came with wordpress? Then you can do anything you want to.

Just make sure you've got an exception for the 410 page itself, otherwise you will get an infinite loop ending in a 500-class error.


 11:56 pm on Dec 4, 2012 (gmt 0)

Something like this?

# Error Doc
ErrorDocument 410 /gone.php

# Send 410 Gone for all requests
RewriteCond %{REQUEST_URI} !^/gone\.php
RewriteRule .* - [G]

If example.com/gone.php is directly requested it could return "200 OK" unless the first line of the PHP file is itself:
HEADER ("HTTP/1.1 410 Gone");
or similar.

Check the PHP manual for the exact syntax for generating this error message.

Global Options:
 top home search open messages active posts  

Home / Forums Index / Code, Content, and Presentation / Apache Web Server
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved