| | |
Mod_Rewrite Problem
Thread Solved |
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:
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
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]
Thanks so Much!!!
FlashCreations
Last edited by FlashCreations; Nov 19th, 2008 at 7:09 pm.
![]() |
Similar Threads
- php and mod_rewrite problem (PHP)
- vBulletin mod_rewrite Problem (PHP)
- Apache mod_rewrite with Google Ads (Linux Servers and Apache)
- .htaccess mod_rewrite problem (Linux Servers and Apache)
Other Threads in the Linux Servers and Apache Forum
- Previous Thread: Organized Distribution
- Next Thread: The Land of Corn, Wheat, and Data Centers
| Thread Tools | Search this Thread |
.net apache asus bbc bluegene centos cisco citrix cloud cloudcomputing datacenters debian dell desktops development distributions distros drivers economy eeepc energy enterprise fedora gadgets gentoo gos government gpl hardware hp hyper-v ibm java jobs kindle knoppix kvm laptop laptops lawsuits licensing limo linustorvalds linux linuxfoundation linuxmagazine magazines microserver microsoft mobile mobilephones netbook netbooks news novell olpc open openmoko openoffice opensolaris opensource opensuse openvz operatingsystems os patents pc pcworld plathome politics print qumranet redhat rhel robot russia sco server servers slackware software solaris source sun supercomputer support tivo torvalds training tv ubuntu umpc unix virtualization vmware windows x86 xandros xen xmas





