currently I m using following code in my site in .htaccess file :
RewriteRule ^([^/\.]+).php?$ comman.php?cat=$1 [L]
This redirects user to comman.php page say, user requests
http://www.mysite.com/myfolder/page1.php
will redirects to
http://www.mysite.com/myfolder/comman.php?cat=page1
This works fine. My question is how can I achieve following
http://www.mysite.com/myfolder/page1.php?var1=123
to redirect
http://www.mysite.com/myfolder/comman.php?cat=page1¶m=123
i.e. whatever value passed to url using get method to add in my new url.
Thanks in Advance…..
You should add the
QSAflag:QSAstands forQuery String Append. Anything after the?in the original URL will be appended to the rewritten URL.