Link to home
Start Free TrialLog in
Avatar of Gary Samuels
Gary SamuelsFlag for United States of America

asked on

The correct 410 syntax

I have about 200 URLs that have been permanently removed. I'm currently using this code to redirect these links to a Not Found page. Notice the URLs contain query strings.
RewriteCond %{QUERY_STRING} Screen=PROD&Store_Code=1212&Product_Code=pumpkin_complexion_bar&Category_Code=facial_soap$
RewriteRule ^(.*)$ http://www.soapforgoodnesssake.com/mm5/merchant.mvc?Screen=NTFD&Store_Code=1212 [R=301,L]

Open in new window

How do I write a rule that redirects to the Not Found page but tells Google that the URL has been permanently removed.
Avatar of Gary
Gary
Flag of Ireland image

Change the error code to 410, that's all you need. Google should eventually remove it from the index
Avatar of Gary Samuels

ASKER

I've tried that but it does not redirect to the Not Found page. Instead I get a screen that says,

Gone

The requested resource
/mm5/merchant.mvc
is no longer available on this server and there is no forwarding address. Please remove all references to this resource.
ASKER CERTIFIED SOLUTION
Avatar of Gary
Gary
Flag of Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial