【发布时间】:2023-07-02 10:07:01
【问题描述】:
我有一个指向文档根 /var/www 的 lighttpd-Setup。但是,我希望 URL other/ 指向 /some/other/dir。我正在使用以下配置进行此操作:
$HTTP["url"] =~ "^/other($|/)" {
server.document-root = "/some/other/dir"
}
但是,如果我访问“http://myhost/other”,lighttpd 会尝试访问 /some/other/dir/other 而不仅仅是 /some/other/dir。是否有可能以某种方式剥离 /other 但保留任何进一步的 URL 段?例如,http://myhost/other/sub/foo.txt 应该指向 /some/other/dir/sub/foo.txt。
【问题讨论】:
标签: lighttpd subdirectory document-root