This commit is contained in:
KIRITO_KMA 2026-04-05 20:49:52 +02:00
parent 7d26ffcee4
commit 25ea6cf6f6
19 changed files with 2270 additions and 467 deletions

View file

@ -4,14 +4,22 @@ Options -Indexes
<IfModule mod_rewrite.c>
RewriteEngine On
# Si fichier/dossier n'existe pas → afficher 404.php
# Force HTTPS (décommenter en production)
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# Si le fichier ou dossier demandé n'existe pas → 404
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ pages/404.php [L]
# Si c'est un dossier sans index → afficher 404.php
# Dossier sans index → 404
RewriteCond %{REQUEST_FILENAME} -d
RewriteCond %{REQUEST_FILENAME}/index.html !-f
RewriteCond %{REQUEST_FILENAME}/index.php !-f
RewriteRule ^ pages/404.php [L]
</IfModule>
# Page d'erreur Apache native (fallback si mod_rewrite absent)
ErrorDocument 404 /pages/404.php
ErrorDocument 403 /pages/404.php