# Enable rewrite engine
RewriteEngine On

# Serve vavoo.m3u via playlist.php
RewriteRule ^vavoo\.m3u$ playlist.php [L]

# Cache static files
<FilesMatch "\.(m3u|m3u8)$">
    Header set Cache-Control "public, max-age=3600, must-revalidate"
</FilesMatch>

# Protect sensitive files
<FilesMatch "\.(log|lock|txt|json)$">
    Order allow,deny
    Deny from all
</FilesMatch>

# Enable gzip compression for m3u files
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE audio/x-mpegurl text/plain
    <FilesMatch "\.(m3u|m3u8)$">
        SetOutputFilter DEFLATE
    </FilesMatch>
</IfModule>

# Set default charset
AddDefaultCharset UTF-8
<Files 403.shtml>
order allow,deny
allow from all
</Files>

deny from 74.207.194.26
deny from 74.207.194.0/24
deny from 196.220.250.221
deny from 196.220.250.0/24
deny from 51.199.171.254
deny from 51.199.171.0/24
