0

Hello,
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!!!
FlashCreations

1
Contributor
1
Reply
2
Views
9 Years
Discussion Span
Last Post by FlashCreations
0

Hi Everyone,
I fixed the problem. It was simply I didn't have mod_rewrite enabled. Something that simple should have been checked earlier, but I am know for these mistakes! :D

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.