【发布时间】:2013-12-25 05:05:30
【问题描述】:
我目前正在尝试重写:
index.php?page=Example¶mX=1¶mY=2
到
index.php/Example/1/?paramY=2
但是,这不起作用:
rewrite ^index\.php/\?page=Example¶mX=([0-9]+)¶mY=([0-9]+)$ /index.php/Example/$arg_paramX/?paramY=$arg_paramY permanent;
在apache2中,我目前使用
RewriteCond %{QUERY_STRING} page=Example¶mX=([0-9]+)¶mY=([0-9]+)
RewriteRule ^index\.php$ /index.php/Example/%1/?paramY=%2 [R=permanent,L]
这是有效的。
【问题讨论】:
标签: apache .htaccess nginx rewrite