I'm having trouble redirecting old site URLs to their new places with a .htaccess file. The conditions don't seem to be matching. I'm sure I'm just doing something stupid, but I can't work out what it is. I've included the whole rewrite section here in case some other part of it is causing the problem, but it's the "redirect old site URLs" section that I assume is the problem.
############################################
## enable rewrites
Options +FollowSymLinks
RewriteEngine on
############################################
## force www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [L,R=301]
############################################
## force SSL
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
############################################
## redirect old site URLs
RewriteCond %{REQUEST_URI} ^/Products\.aspx\?pid=3 [NC,OR]
RewriteCond %{REQUEST_URI} ^/contactus\.aspx [NC,OR]
RewriteCond %{REQUEST_URI} ^/tipsandadviceinstallation\.aspx [NC,OR]
RewriteCond %{REQUEST_URI} ^/index\.aspx [NC]
RewriteRule .* https://%{HTTP_HOST}/ [L,R=301]
RewriteCond %{REQUEST_URI} ^/PdfFiles/Cattle%20Floor%20Fitting%20Guidelines\.pdf [NC,OR]
RewriteCond %{REQUEST_URI} ^/Products\.aspx\?pid=41 [NC]
RewriteRule .* https://%{HTTP_HOST}/flooring/engineered-wood\.html\?manufacturer=4 [L,R=301]
RewriteCond %{REQUEST_URI} ^/Products\.aspx\?pid=812 [NC]
RewriteRule .* https://%{HTTP_HOST}/doors/internal.html?manufacturer=131 [L,R=301]
############################################
## workaround for HTTP authorization
## in CGI environment
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
############################################
## always send 404 on missing files in these folders
RewriteCond %{REQUEST_URI} !^/(media|skin|js)/
############################################
## never rewrite for existing files, directories and links
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
############################################
## rewrite everything else to index.php
RewriteRule .* index.php [L]
All of the other rewrite rules are working. It's just that section. Plain old boring
Redirect 301 /Products.aspx?pid=812 https://www.flooringanddoors.co.uk/doors/internal.html?manufacturer=131
works as well, but I want case-insensitive matches, and there's no way I'm writing the number of lines needed to match that.