File: /var/www/itself.kauko.lt/.htaccess
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress
# -------------------------------------
# Security & Hardening (optional)
# -------------------------------------
# Disable directory browsing
Options -Indexes
# Protect wp-config.php
<Files wp-config.php>
order allow,deny
deny from all
</Files>
# Block XML-RPC (optional: can break some plugins)
<Files xmlrpc.php>
order deny,allow
deny from all
</Files>
# Prevent access to sensitive files
<FilesMatch "\.(htaccess|htpasswd|ini|log|conf|env)$">
Order Allow,Deny
Deny from all
</FilesMatch>
# Security headers
<IfModule mod_headers.c>
Header set X-Content-Type-Options "nosniff"
Header set X-XSS-Protection "1; mode=block"
Header always set Referrer-Policy "no-referrer-when-downgrade"
Header always set Permissions-Policy "geolocation=(), microphone=(), camera=()"
Header always set X-Frame-Options "SAMEORIGIN"
</IfModule>