Solved

The correct 410 syntax

Posted on 2013-06-12
3
227 Views
Last Modified: 2013-06-17
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.
0
Comment
Question by:garysamuels
  • 2
3 Comments
 
LVL 58

Expert Comment

by:Gary
ID: 39241514
Change the error code to 410, that's all you need. Google should eventually remove it from the index
0
 

Author Comment

by:garysamuels
ID: 39241612
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.
0
 
LVL 58

Accepted Solution

by:
Gary earned 500 total points
ID: 39241784
RewriteCond %{QUERY_STRING} Screen=PROD&Store_Code=1212&Product_Code=pumpkin_complexion_bar&Category_Code=facial_soap$
RewriteRule ^(.*)$ /mm5/merchant.mvc?Screen=NTFD&Store_Code=1212 [R=410,L]

ErrorDocument 410 /mm5/merchant.mvc?Screen=NTFD&Store_Code=1212
0

Featured Post

Highfive Gives IT Their Time Back

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

Article by: kevp75
Hey folks, 'bout time for me to come around with a little tip. Thanks to IIS 7.5 Extensions and Microsoft (well... really Windows 8, and IIS 8 I guess...), we can now prime our Application Pools, when IIS starts. Now, though it would be nice t…
If your site has a few sections that need to be secure when data is transmitted between the server and local computer, such as a /order/ section for ordering or /customer/ which contains customer data, etc it would of course be recommended to secure…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now