lighttpd url每个vhost重写

时间:2015-11-20 11:12:25

标签: mod-rewrite lighttpd

我有一个运行简单虚拟主机的lighttpd网络服务器。我想为其中一个主机重写一个url。我在/etc/lighttpd/lighttpd.conf中尝试了这个:

$HTTP["host"] == "api.sitename.com" {
  server.document-root = "/var/www/api.sitename.com/"
  accesslog.filename = "/var/log/lighttpd/api.sitename.access.log"
  url.rewrite = ( "^(.*)$" => "/index.php?$1" )
}

用于API。 (https://github.com/alixaxel/ArrestDB

1 个答案:

答案 0 :(得分:1)

url.rewrite = ( "^(.*)$" => "/index.php/$1" )

change :                               ^
                                       from ? to /
相关问题