2017-08-18 121 views
1

我在使用.htaccess文件時遇到了一些麻煩,我認爲問題在於我使用的條件&作爲示例,我已經使用了正確的工作。Mod_rewrite .htaccess問題

<IfModule mod_rewrite.c> 
RewriteEngine On 
RewriteCond %{REQUEST_URI} .*ts$|.*m3u8$ [NC] 
RewriteRule ^(.*) process.php?file=$1 [NC,L] 
</IfModule> 

如果任何人都可以發現錯誤並指向我的寫作方向,我將非常感激。

感謝

+1

什麼這個問題的? – anubhava

+0

它根本不起作用,就好像沒有重寫規則一樣。如果我刪除'RewriteCond%{REQUEST_URI}。* ts $ |。* m3u8 $ [NC]'行,那麼它將加載process.php,但'file'$ _GET不起作用。 – Andrew

+0

你將什麼URL發送到網絡服務器? – anubhava

回答

1

有你的.htaccess這樣的:

RewriteEngine On 

RewriteRule ^.*\.(?:ts|m3u8)$ process.php?file=$0 [NC,L,QSA]