1
我正在尝试使URL写入规则起作用,但在规则应用后它不显示任何数据。多个URL参数重写规则不起作用
的URL(不重写)
http://example.com/categories.php?explore=design&sc=css
的URL(与改写)
http://example.com/design/css/
重写规则,我有
#Level-1
RewriteCond %{THE_REQUEST} /categories\.php\?explore=([^\s&]+) [NC]
RewriteRule^categories/%1/? [R=302,L,NE]
RewriteRule ^categories/([^/]+)/?$ categories.php?explore=$1 [NC,L,QSA]
#Level-2
RewriteCond %{THE_REQUEST} /categories\.php\?explore=([^\s&]+)&sc=([^\s&]+) [NC]
RewriteRule^categories/%1/%2/? [R=302,L,NE]
RewriteRule ^categories/([^/]+)/?$ categories.php?explore=$1&sp=$2 [NC,L,QSA]
以上只为1级别工作,第二级别有什么不对?
有你试图移动level2的第一名? –
@PedroLobito是的,我做了但没有结果.... – yaqoob