我的問題是要從子目錄鏈接重定向到一個檔案。 我目前的網址
www.sample.com/stream/34/video.m3u8
www.sample.com/stream/35/video.m3u8
希望
www.sample.com/stream.php?param1=35¶m2=video.m3u8
或者
www.sample.com/stream/index.php?param1=35¶m2=video.m3u8
請拯救我的生命
uj5u.com熱心網友回復:
你可以使用根檔案.htaccess中的mod_rewrite做如下事情,以重寫請求到/stream.php?param1=<id>¶m2=<file>:
Options -MultiViews
重寫引擎開啟
RewriteRule ^stream/(d )/([w-] .w{2,4})$ stream.php?param1=$1¶m2=$2 [L]
這假定<id>(第2個路徑段)完全是數字,第3個路徑段由<filename>.<ext>組成。如果這就是你所期望的,你應該將其限制為m3u8。
轉載請註明出處,本文鏈接:https://www.uj5u.com/ruanti/310716.html
標籤:
上一篇:CNN模型只預測頭等艙
