可能是一个简单的问题,但我无法解决;(
我有网址:
http://example.net/index.php/topic?122.0.html
我只需要更改“?” 符号为“,”。像这样:
http://example.net/index.php/topic,122.0.html
该规则不起作用:
RewriteRule ^(.*)\?(.*)$ /$1,$2
我也尝试了\%3F,但没有结果。我在http://htaccess.madewithlove.be/上对其进行了测试
您无法使用来匹配查询字符串RewriteRule
。在您的根.htaccess中使用此规则:
RewriteEngine On
RewriteCond %{QUERY_STRING} \.html$ [NC]
RewriteRule ^(index\.php/.*)$ /$1,%{QUERY_STRING}? [L,NE,NC,R=302]
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句