Solved

The correct 410 syntax

Posted on 2013-06-12
3
235 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:Gary Samuels
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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:Gary Samuels
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

Windows Server 2016: All you need to know

Learn about Hyper-V features that increase functionality and usability of Microsoft Windows Server 2016. Also, throughout this eBook, you’ll find some basic PowerShell examples that will help you leverage the scripts in your environments!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Best IDE for PHP starters 11 141
How to ensure a smooth transition to Let's Encrypt SSL Cert? 2 87
change time in cron 4 101
wamp versus xampp 4 68
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…

726 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