我有一个运行简单虚拟主机的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)
答案 0 :(得分:1)
url.rewrite = ( "^(.*)$" => "/index.php/$1" )
change : ^
from ? to /