我正在使用 Lighttpd 重写 URL
url.rewrite-once = (
"^/(.*)\.(.+)$" => "$0",
"^/(.+/?)\??$" => "/index.php?q=$1"
)
这样所有的 url 都作为变量 q 传递给 index.php。但是,当我访问http://mydomain.com/account/edit?user=5我的 index.php 脚本时
q=account/edit?user=5
在apache上我会得到所有变量,即
q=account/edit AND
user=5
如何保留 Lighttpd 中的变量?
(url.rewrite 规则的第一部分是确保存在的文件正确显示)