Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我的 .htaccess 中有这个:
RewriteRule ^account /?i=a [L] RewriteRule ^account/banners /?i=a&p=b [L]
然而,当我去 时http://domain.com/account/banners,它只显示 /account (?i=a) 而不是 /account/banners (?i=a&p=b)
http://domain.com/account/banners
我怎样才能解决这个问题?
提前致谢。
用终止/account表达式$。否则,模式^account匹配/account和/account/banners。
/account
$
^account
/account/banners
RewriteRule ^account$ /?i=a [L] RewriteRule ^account/banners /?i=a&p=b [L]
我认为问题在于您的第一条规则是捕获包含帐户的内容,而不仅仅是等于“帐户”,请尝试在最后输入美元符号