Reputation: 35
i like to ask some help for proper redirect 410 after site migration
my previous cms creating pattern similar like this
https://www.website.com/search/label/books?updated-max=2019-10-19T07:06:00-07:00max-results%3D20start=20by-date=falsem=0
https://www.website.com/search/label/magazine?updated-max=2019-10-19T07:06:00-07:00max-results%3D20start=20by-date=falsem=0
what i want to achieve is to set everything after label
to point at 410 status in my htaccess, but search
still intact 200 status (as wordpress also using it as search query)
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
Upvotes: 2
Views: 269
Reputation: 133760
Could you please try this simple rule in your .htaccess file. This will redirect any url whose uri contains label
to 410 status. Please make sure you clear your browser cache before you test your URLs.
RewriteEngine ON
RewriteRule label - [G]
Upvotes: 3