I am facing problem to get variable from query string. I have used htaccess redirection for my page.
I have written following rule.
RewriteEngine On
RewriteRule ^([a-zA-Z0-9-/]+).htm$ category.php?uniqname=$1
RewriteRule ^([a-zA-Z0-9-/]+).htm/$ category.php?uniqname=$1
what this rule is doing if I type gold-plated-chain.htm is browser that I am redirect to
category.php?uniqname=gold-plated-chain
Now I want to pass one varible so I am doing this way gold-plated-chain.htm?page=2 but I can’t get page variable on category.php i am redirecting properly but without that page variable
Thank You in advance
I /think/ what you’re after is the QSA flag (see http://httpd.apache.org/docs/2.0/mod/mod_rewrite.html) which should append query strings.
Try adding [QSA] to the end of your RewriteRule lines.