gpt4 book ai didi

linux - Lighttpd mod_rewrite 到 Apache Mod_rewrite

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:12:57 29 4
gpt4 key购买 nike

我在这里寻求帮助。我正在尝试将 lighttpd mod_rewrite 转换为 apache mod_rewrite

在这里。轻型服务器

    url.rewrite-once = (
"/torrent/([0-9A-F]{2,2})([0-9A-F]{2,2})([0-9A-F]{36,36}).*" => "/t3/$1/$2/$3.torrent",
)

我查找了 apache 的 mod_rewrite 的多个教程,但确实没有帮助。

这是我想出的:

RewriteRule ^/torrent/ ([0-9A-F]{2,2})/ ([0-9A-F]{2,2})/ ([0-9A-F]{36,36})/* => /t3/$1/$2/$3.torrent

如果有人能帮我转换一下,那就太好了,谢谢

当我输入它时,我得到的只是错误代码 500,mod_rewrite 已启用,但这不起作用。

最佳答案

Apache’s mod_rewrite语法有点不同:

RewriteRule Pattern Substitution [flags]

The parts are separated by one or more whitespace characters and [flags] is optional.

So try this:

RewriteRule ^/torrent/([0-9A-F]{2})/([0-9A-F]{2})/([0-9A-F]{36}) /t3/$1/$2/$3.torrent

关于linux - Lighttpd mod_rewrite 到 Apache Mod_rewrite,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1283298/

29 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com