| Welcome to WebmasterWorld Guest from 188.8.131.52 |
register, login, search, subscribe, help, library, PubCon, announcements, recent posts, open posts,
|Subscribe to WebmasterWorld|
|Force a 410 error|
| 7:48 pm on Mar 14, 2013 (gmt 0)|
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:
RewriteRule ^/it-doesnot.exist - [G]
But the browser still returns a 404 for this url.
| 8:30 pm on Mar 14, 2013 (gmt 0)|
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)|
Perfect - Thank you!
All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
WebmasterWorld ® and PubCon ® are a Registered Trademarks of Pubcon Inc.
© Pubcon Inc. 1996-2012 all rights reserved