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.
访问代码
RewriteRule ^search/(.*)/?(.*)?$ ./?query=/search/$1&$2 [L]
例如我想链接 http://localost.com/search/key/?get=get
然后它得到了一个 http://localost.com/?query=/search/key&get=get
但为什么不做对呢?
我替换? =其他字符都可以...
? =
谁帮助你的专业
你只需要这条规则:
RewriteRule ^search/(.+?)/?$ /?query=/search/$1 [L,QSA,NC]