Welcome to WebmasterWorld Guest from

Forum Moderators: Ocean10000 & incrediBILL & phranque

Message Too Old, No Replies

Force a 410 error



7:48 pm on Mar 14, 2013 (gmt 0)

10+ Year Member

Hi -

Google has indexed pages that do not exist on my site. At the moment webmaster tools says the are 404s but I want to change them to 410s.

In .htaccess I have pages for the errors:

ErrorDocument 404 /404.htm
ErrorDocument 410 /410.htm

and I have:

RewriteEngine On
RewriteRule ^/it-doesnot.exist - [G]

But the browser still returns a 404 for this url.

Any ideas?


8:30 pm on Mar 14, 2013 (gmt 0)

WebmasterWorld Senior Member g1smd is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

Remove the leading slash from the RegEx pattern.

Paths are localised on a "per-directory" basis before being presented to mod_rewrite.


8:50 pm on Mar 14, 2013 (gmt 0)

10+ Year Member

Perfect - Thank you!

Featured Threads

Hot Threads This Week

Hot Threads This Month