Url rewriting Lighttpd url重写删除查询字符串变量
我正在使用Url rewriting Lighttpd url重写删除查询字符串变量,url-rewriting,lighttpd,Url Rewriting,Lighttpd,我正在使用 url.rewrite-once = ( "^/(.*)\.(.+)$" => "$0", "^/(.+/?)\??$" => "/index.php?q=$1" ) 因此,所有URL都作为变量q传递给index.php。但是,当我访问index.php上的脚本时 q=account/edit?user=5 在apache上,我将获得所有变量,即 q=account/edit AND user=5 如何在Lighttpd中保留变量 (url.rewrite规则的
url.rewrite-once = (
"^/(.*)\.(.+)$" => "$0",
"^/(.+/?)\??$" => "/index.php?q=$1"
)
因此,所有URL都作为变量q传递给index.php。但是,当我访问index.php上的脚本时
q=account/edit?user=5
在apache上,我将获得所有变量,即
q=account/edit AND
user=5
如何在Lighttpd中保留变量
(url.rewrite规则的第一部分是确保正确显示存在的文件)尝试以下操作:
"^/something/(\d+)(?:\?(.*))?" => "/index.php?bla=$1&$2"
还是这个
"^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
"^/([^.?]*)$" => "/index.php?q=$1"
试着这样做:
"^/something/(\d+)(?:\?(.*))?" => "/index.php?bla=$1&$2"
还是这个
"^/([^.?]*)\?(.*)$" => "/index.php?q=$1&$2",
"^/([^.?]*)$" => "/index.php?q=$1"
我已经有了一个临时的解决方案,所以我在想,没有坏的就不要去解决,但是我会按照你的建议去做,并向你汇报。我已经有了一个临时的解决方案,所以我在想,没有坏的就不要去解决,但我会按照你的建议去做,并向你汇报