Search code examples
apache.htaccessmod-rewritewebserver

Mod_rewrite .htaccess problems


I'm having some trouble with a .htaccess file I'm using, I think the issue is with the conditions & rules I'm using as examples I have used have worked properly.

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

If anyone can spot the mistake and point me in the write direction I'd be most grateful.

Thanks


Solution

  • Have your .htaccess like this:

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