# Allow video files to load
<FilesMatch "\.(mp4|webm|ogg)$">
    Order Allow,Deny
    Allow from all
    Header set Content-Type "video/mp4"
    Header set Accept-Ranges "bytes"
</FilesMatch>

# Block direct access & hotlinking
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{HTTP_REFERER} !^https?://(www\.)?itgalaxy\.academy [NC]
RewriteRule \.(mp4|webm|ogg)$ - [F,L]