jmace
12-18-2010, 06:56 PM
On my website, I am using redirects to change addresses like
http://example.com/about to
http://example.com/?page=about
I have this code:
RewriteEngine on
RewriteRule ^([a-zA-Z0-9]+)$ ./?page=$1
Which works great. Until you have an address like this:
http//example.com/about?name=bob
The query is completely lost. How can I do the redirect and keep the query? So
http://example.com/about?name=bob becomes
http://example.com/?page=about&name=bob
Thanks.
http://example.com/about to
http://example.com/?page=about
I have this code:
RewriteEngine on
RewriteRule ^([a-zA-Z0-9]+)$ ./?page=$1
Which works great. Until you have an address like this:
http//example.com/about?name=bob
The query is completely lost. How can I do the redirect and keep the query? So
http://example.com/about?name=bob becomes
http://example.com/?page=about&name=bob
Thanks.