How can I forward a query string using htaccess?

Posted by Eric on Stack Overflow See other posts from Stack Overflow or by Eric
Published on 2010-06-11T16:02:59Z Indexed on 2010/06/11 16:12 UTC
Read the original article Hit count: 138

Filed under:
|

I am using this, at present, to rewrite URLS:

RewriteEngine on
RewriteRule ^([^/?\.]+)$ /page.php?name=$1 [NC]

So mysite.com/home gets rewritten to mysite.com/page.php?name=home

How can I make it also rewrite mysite.com/home?param=value to mysite.com/page.php?name=home&param=value? Ideally, I'd like this to work for any name/value querystring pairs.

Am I missing something obvious?

© Stack Overflow or respective owner

Related posts about .htaccess

Related posts about querystring