我正在尝试映射网址
localhost/abc/meetings/?day=5&month=12&year=2011
到
localhost/abc/pages/list_meetings.php?day=5&month=12&year=2011
我的重写规则不起作用,
RewriteEngine On
RewriteBase /abc/
RewriteRule ^meetings/?day=([0-9]+)&month=([0-9]+)&year=([0-9]+)$ /abc/pages/list_meetings.php?day=$1&month=$2&year=$3 [L,QSA]
答案 0 :(得分:0)
QSA会自动附加查询字符串,因此您无需在重写规则中处理get变量。这样的事情应该有效:
RewriteEngine On
RewriteBase /abc/
RewriteRule ^meetings/$ /abc/pages/list_meetings.php [L,QSA]