############################################
# Disable Directory Browsing
############################################
Options -Indexes


############################################
# Protect Sensitive Files
############################################
<FilesMatch "(^\.|\.env|composer\.json|composer\.lock|package\.json|yarn\.lock|\.git|\.sql|\.log)">
    Order allow,deny
    Deny from all
</FilesMatch>


############################################
# Block XML-RPC
############################################
<Files xmlrpc.php>
    Order allow,deny
    Deny from all
</Files>


############################################
# Security Headers
############################################
<IfModule mod_headers.c>
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set X-XSS-Protection "1; mode=block"
    Header always set X-Content-Type-Options "nosniff"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>


############################################
# Hotlink Protection (Images)
############################################
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_REFERER} !^$
RewriteCond %{REQUEST_FILENAME} -f
RewriteCond %{REQUEST_FILENAME} \.(gif|jpe?g?|png|webp)$ [NC]
RewriteCond %{HTTP_REFERER} !^http(s)?://(www\.)?evoxim\.com [NC]
RewriteRule \.(gif|jpe?g?|png|webp)$ - [F,NC,L]
</IfModule>


############################################
# BEGIN WordPress
############################################
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
############################################
# END WordPress
############################################


############################################
# AIOWPSEC Firewall
############################################
<IfModule mod_php.c>
php_value auto_prepend_file '/home/evoxim/public_html/aios-bootstrap.php'
</IfModule>
############################################
