Options -Indexes
RewriteEngine On

# API routes
RewriteRule ^api/(.*)$ api/api.php?path=$1 [QSA,L]

# TV public screen
RewriteRule ^tv/?$ tv.php [L]
RewriteRule ^tv/([0-9]+)/?$ tv.php?tournament_id=$1 [L]

# Installer
RewriteRule ^install/?$ install/install.php [L]

# All other routes to index
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L]
