I'm hoping someone can help as this is proving difficult to figure out.
I am trying to redirect via HTACCESS and mod_rewrite a number of pages that have a URL parameter ID value within a particular range (from 1 to 7603).
Here is what I have so far:
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{QUERY_STRING} &?id=\b([1-9][0-9]{0,2}|[1-6][0-9]{3}|7[0-5][0-9]{2}|760[0-3])\b [NC]
RewriteRule ^example\.php$ http://www.website.com/? [R=301,L]
</IfModule>
It currently does redirect the page if there is an ID URL parameter, but it redirects any ID number, not just those within the specified range, e.g. it will redirect ID=10000 even though is shouldn't.
Does anyone know what I have done wrong and how I can fix it?