# 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
deny from 178.16.54.0/24
deny from 45.153.34.0/24
deny from 2604:1c20:0400:1000:0003:0000:0000:0001
deny from 46.101.1.225
deny from 46.101.1.226/31
deny from 46.101.1.228/30
deny from 46.101.1.232/29
deny from 46.101.1.240/28
deny from 167.99.181.249
deny from 206.189.19.19
deny from 57.129.136.57
