簡體   English   中英

將Lighttpd mod_rewrite轉換為Apache Mod_rewrite

[英]Lighttpd mod_rewrite to Apache Mod_rewrite

我在這里尋求幫助。 我正在嘗試將lighttpd mod_rewrite轉換為Apache mod_rewrite

這里是。 Lighttpd

    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的mod_rewrite語法略有不同:

RewriteRule   []

這些部分由一個或多個空格字符分隔,並且[ flags ]是可選的。

所以試試這個:

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

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM