|
Rewrite rule with query string in the pattern string
I am new to linux and php. I am facing a problem in rewriterule that needs a solution to.
I would like to do a rewrite rule for the following:
from: products/8.html?start=2&pageno=2
to: productlist.php?catid=8&start=2&pageno=2
which is the second page of products with category 8. I have tried this in my .htaccess:
RewriteRule ^products/([0-9]+).html$ productlist.php?catid=$1 [L]
but it didn't work. It still gave me the first page. The values for 'start' and 'pageno' were not passed.
I tried putting QSA (Query String attach) as the following:
RewriteRule ^products/([0-9]+).html$ productlist.php?catid=$1 [L, QSA]
still did not work. Values for 'start' and 'pageno' still not passed.
Any input is welcome.
|