Reputation: 1
I have the below and it works to redirect but there's loads of different ID's for the reviews.php file, is it possible for it to redirect all the id's from 1 to 10000?
RewriteCond %{QUERY_STRING} ^item_id=3105$
RewriteRule ^reviews.php$ /? [R=302,L]
Thanks
Craig
Upvotes: 0
Views: 122
Reputation: 166
This should do the trick. Any reason you're using a 302 instead of a 301?
RewriteCond %{QUERY_STRING} ^(.*)item_id=([0-9]+)$
RewriteRule ^reviews.php$ /?item=%2 [R=302,L]
Upvotes: 1