Options -MultiViews
DirectoryIndex index.html

RewriteEngine On

# Autoriser explicitement le dossier _next
RewriteRule ^_next/(.*)$ _next/$1 [L]

# Servir les fichiers existants directement
RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]

# Rediriger /page vers /page.html si existe
RewriteCond %{REQUEST_FILENAME}.html -f
RewriteRule ^([^\.]+)$ $1.html [L]

ErrorDocument 404 /404.html

# Types MIME
AddType application/javascript .js
AddType text/css .css
AddType image/svg+xml .svg
AddType font/woff2 .woff2
