Options -Indexes
RewriteEngine on
# Don't apply to URLs that go to existing files or folders.

RewriteEngine On
# Regra para redirecionar URLs que terminam com hapi.php para dns.php

RewriteCond %{QUERY_STRING} ^action=auth$
RewriteRule ^init/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/hapi\.php$ api/v3/hapi.php?action=auth&real_user=$1&real_pass=$2 [L]
RewriteCond %{QUERY_STRING} ^action=auth(&.*)?$
RewriteRule ^init/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/api\.php$ api/v3/api.php?action=auth&real_user=$1&real_pass=$2& [L]
RewriteCond %{QUERY_STRING} !^action=auth$
RewriteRule ^init/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/hapi\.php$ api/v3/hapi.php?real_user=$1&real_pass=$2 [L]
RewriteCond %{QUERY_STRING} ^action=changeChannel$
RewriteRule ^init/([a-zA-Z0-9]+)/([a-zA-Z0-9]+)/api\.php$ api/v3/api.php?action=changeChannel&real_user=$1&real_pass=$2& [L]



RewriteOptions InheritDown


RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^live/(.*)$ live.php?path=$1 [NC,L]
RewriteRule ^xmltv/(.*)$ xmltv.php?path=$1 [NC,L]
RewriteRule ^movie/(.*)$ movie.php?path=$1 [NC,L]
RewriteRule ^series/(.*)$ series.php?path=$1 [NC,L]
RewriteRule ^timeshift/(.*)$ timeshift.php?path=$1 [NC,L]