Mod rewrite Mod Rewrite app.php lighttpd

Mod rewrite Mod Rewrite app.php lighttpd,mod-rewrite,symfony,lighttpd,Mod Rewrite,Symfony,Lighttpd,我想重写我的Symfony 2 URL,这样就不用显示 www.example.com/app.php/path 它表明 www.example.com/path 我如何使用lighttpd实现这一点?就这么简单: url.rewrite-if-not-file = ( "(.+)" => "/app.php$1" ) 以下是一篇关于以下内容的新文章: Symfony2标准版附带了一个.htaccess文件,该文件具有适合框架的URL重写规则。看看如何在lighttpd上使用(或

我想重写我的Symfony 2 URL,这样就不用显示

www.example.com/app.php/path

它表明

www.example.com/path

我如何使用lighttpd实现这一点?

就这么简单:

url.rewrite-if-not-file = (
    "(.+)" => "/app.php$1"
)

以下是一篇关于以下内容的新文章:


Symfony2标准版附带了一个.htaccess文件,该文件具有适合框架的URL重写规则。看看如何在lighttpd上使用(或转换)它。遗憾的是,该网站已经关闭。幸运的是,internet存档仍然可用:
$HTTP["host"] =~ "myhost\.tld" {
    server.document-root = "/home/user/www/myhost/web"

    url.rewrite-if-not-file = (
        "^/$" => "$0",
        "^(?!app_dev\.php/)[^\?]+(\?.*)?" => "app.php/$1$2",
    )
}