Options -Indexes
RewriteEngine on
RewriteOptions InheritDown

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

# Handle live, movie, series, timeshift paths
RewriteRule ^(live|movie|series|timeshift)/(.*)$ $1.php?path=$2 [NC,L]
RewriteRule ^streaming/timeshift\.php$ timeshift.php [L]

# Allow direct access to PHP files
RewriteCond %{REQUEST_URI} !\.php$ [NC]
RewriteCond %{REQUEST_URI} !^/(live|movie|series|timeshift)/ [NC]
RewriteRule ^(.*)$ index.php?path=$1 [QSA,L]
