如何在lighttpd中启用mod重写

Ram*_*esh 3 php mod-rewrite lighttpd

我需要在lighttpd中启用模式重写它不应该显示index.php扩展名....

Ken*_*ins 5

如果我理解你的问题,你需要重写/索引到/index.php.这应该可以解决问题.

server.modules += ("mod_rewrite")
url.rewrite-once = ( 
    "^(.*)$" => "$1.php"
);
Run Code Online (Sandbox Code Playgroud)

注意,这也将转发url,例如/image.jpg - > /image.jpg.php.如果您需要更复杂的解决方案,请调整您的问题.