RewriteRule ^([^/.]+)?orderby=([^/.]+)&sort=([^/.]+)$ index.php?category=$1&orderby=$2&sort=$3 [L,NC]
RewriteRule ^([^/.]+)$ index.php?category=$1 [L,NC]
my html code is like this
<form method="get" action="">....
If I submit the form the URL is like this: http://site.com/category?orderby=hits&sort=desc (The variables orderby and sort don开发者_JAVA技巧t work) It looks like my first rule is ignored.
use [QSA]
flag (means query string append
)
RewriteRule ^([^/.]+)$ index.php?category=$1 [L,NC,QSA]
RewriteRule
does not use query string to match url
精彩评论