I am currently having a problem with .htaccess. I am trying to use mod_rewrite to rewrite: http://www.example.com/test/test?word=test to http://www.example.com/test/test.php?word=test. The only problem is the GET vars can have different names. So another example url could be http://www.example.com/test/test?test=true&form=1 or even http://www.example.com/test/test?search=Google&type=Web etc. For this I wrote a simple PHP script called test.php that simply uses foreach to write all the GET variables to the screen. Then I used this .htaccess file to do the rewriting:
RewriteEngine on RewriteRule ^test/?([.])?$ test.php/?$1 [L]
It should rewrite test?some+vars+here to test.php?some+vars+here but for some reason it doesn't. The test page is diplaying perfectly, but for some reason mod_rewrite won't rewrite the GET vars in. I am using Apache 2.2. Can some mod_rewrite expert help me. This is urgent!!!!
Thanks so Much!!!