I have a .htaccess file in the root of a website:
/var/www/mywebsite/htdocs/.htacess
and I have some files in
/var/www/mywebsite/htdocs/folder/
which are currently generated by index.php?pc=1234
I want to redirect the numbers in the query string variable to static html pages within that folder. I can achieve this in the .htacess file in the root of the website by:
RewriteRule ^folder/\?pc=1 /folder/filename.html [R=301,L]
However as there are a few of these files, it would be useful if I could create a .htaccess file in:
/var/www/mywebsite/htdocs/folder/.htaccess
My question is: How do I capture the querystring and redirect accordingly from this folder?