I'm migrating a website from an old server thats being shutdown to a new one, and in the process I'm having some trouble with Apache and mod_rewrite. I have the following .htaccess file:
RewriteEngine on
RewriteRule ^audio/(.*?)/.*?$ audio.php?id=$1
RewriteRule ^books/(.*?)/.*?$ books.php?id=$1
The audio.php and books.php are being called as expected except that the captured variables are not being passed, so in the case of the audio.php rewriterule I am being served the audio.php page but $_GET is empty.
To test what is happening I added RewriteRule (.*) test.php?a=$1 where test.php just dumped $_GET when I did that $_GET['a'] contained 'test.php'.
Nothing is showing up in the error log, and as the correct files are being served clearly the rewrite is mostly working, and the config has AllowOverride All what am I doing wrong?
I want to be clear that this htaccess file worked as is on the old server.