| 123456789101112131415161718192021222324 |
- # Audit Express Self - Sécurité Apache (OVH)
- # Forcer HTTPS
- <IfModule mod_rewrite.c>
- RewriteEngine On
- RewriteCond %{HTTPS} off
- RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
- </IfModule>
- # Désactiver l'affichage du contenu des répertoires
- Options -Indexes
- # Bloquer l'accès aux fichiers sensibles
- <FilesMatch "\.(env|log|json|sql|md|lock|yml|yaml)$">
- Require all denied
- </FilesMatch>
- # Protection contre le hotlinking des images (optionnel)
- # <IfModule mod_rewrite.c>
- # RewriteEngine On
- # RewriteCond %{HTTP_REFERER} !^$
- # RewriteCond %{HTTP_REFERER} !^https?://(www\.)?votredomaine\.fr [NC]
- # RewriteRule \.(jpg|jpeg|png|gif|svg|webp)$ - [F]
- # </IfModule>
|