.htaccess htaccess重写规则应该如何执行?
示例地址:mysite.com/search/?q=笔记本 我的重写规则.htaccess htaccess重写规则应该如何执行?,.htaccess,getparameter,.htaccess,Getparameter,示例地址:mysite.com/search/?q=笔记本 我的重写规则 RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ example.php?param1=$1¶m2=$2 此规则忽略?q=个字符。 htaccess重写规则应如何接受此特殊字符?看起来您只是QSA标记: RewriteRule ^([\w-]+)/([\w-]+)$ example.php?param1=$1¶m2=$2 [L,QSA] Q
RewriteRule ^([a-zA-Z0-9_-]+)/([a-zA-Z0-9_-]+)$ example.php?param1=$1¶m2=$2
此规则忽略?q
=个字符。
htaccess重写规则应如何接受此特殊字符?看起来您只是
QSA
标记:
RewriteRule ^([\w-]+)/([\w-]+)$ example.php?param1=$1¶m2=$2 [L,QSA]
(查询字符串附加)标志在添加新查询参数时保留现有查询参数QSA