Url rewriting 在Lighttpd中使用mod_rewrite从URL中删除index.php

Url rewriting 在Lighttpd中使用mod_rewrite从URL中删除index.php,url-rewriting,lighttpd,Url Rewriting,Lighttpd,我试图从中删除index.php,但没有成功 我试过: url.rewrite-once = ( "^/(test)(.*)” => “/$1$2", "^/(.*)$” => “/index.php/$1" ) 而且: url.rewrite = ( "^/(.*)\.(.+)$" => "$0", "^/(.+)/?$" => "/api/index.php/$1" ) 但两者都不起作用。url.rewrite的正确语法是什么?在/etc/

我试图从中删除index.php,但没有成功

我试过:

url.rewrite-once = (
  "^/(test)(.*)” => “/$1$2",
  "^/(.*)$” => “/index.php/$1"
)
而且:

url.rewrite = (
    "^/(.*)\.(.+)$" => "$0",
    "^/(.+)/?$" => "/api/index.php/$1"
)

但两者都不起作用。url.rewrite的正确语法是什么?

在/etc/lighttpd/lighttpd.conf中启用lighttpd模块mod_rewrite