我在这里寻求帮助。我正在尝试将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的multiply教程,但是没有任何帮助。
我想到的是:
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/

10-13 01:23