Lighttpd url 用 php mvc 重写
Lighttpd url rewrite with php mvc
我希望将 root/cvideo/...
上的所有请求重新路由到 root/cvideo/index.php
,问题出现在 js 和 css 上,它也被路由,这是我能做的最好的...
url.rewrite-once = ( "/(js|jpg|css|)/$"=>"[=12=]",
"^/cvideo([^?])*$"=>"/cvideo/index.php" )
我的正则表达式似乎是 regit,但每当我访问 js 或 css 文件时它都会导致 404 错误,其他部分工作正常。帮助?请?
您的正则表达式模式有点错误:
url.rewrite-once = (
"^.*\.(js|jpg|css)/?$" => "[=10=]",
"^/cvideo" => "/cvideo/index.php"
);
请注意,我不知道 lighttpd 如何处理 [=11=]
组,这就是我在模式中添加 .*
的原因。
我希望将 root/cvideo/...
上的所有请求重新路由到 root/cvideo/index.php
,问题出现在 js 和 css 上,它也被路由,这是我能做的最好的...
url.rewrite-once = ( "/(js|jpg|css|)/$"=>"[=12=]",
"^/cvideo([^?])*$"=>"/cvideo/index.php" )
我的正则表达式似乎是 regit,但每当我访问 js 或 css 文件时它都会导致 404 错误,其他部分工作正常。帮助?请?
您的正则表达式模式有点错误:
url.rewrite-once = (
"^.*\.(js|jpg|css)/?$" => "[=10=]",
"^/cvideo" => "/cvideo/index.php"
);
请注意,我不知道 lighttpd 如何处理 [=11=]
组,这就是我在模式中添加 .*
的原因。