我正在尝试将一个子目录重定向到另一个域,最好是https。我有一些重定向规则可以转发到http到https,它可以工作,但我希望一个特定的子目录转发到另一个域。它应该将example.com/subdr/anything转发到newdomain.com/anything
$HTTP["host"] =~ "example.com" {
accesslog.filename = "/var/log/lighttpd/example.com/access.log"
url.redirect = ( "^/(.*)" => "https://example.com/$1" )
server.name = "example.com"
}
}
您试过阅读文档吗?https://wiki.lighttpd.net/Docs_ModRedirect
url.redirect = (
"^/subdir/whatever/(.*)" => "https://newdomain.com/whatever/$1",
"^/(.*)" => "https://example.com/$1"
)