RewriteEngine On # HTTPS RewriteCond %{HTTPS} off RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] # Supprimer index.php RewriteCond %{THE_REQUEST} \s/+(.*/)?index\.php[\s?] RewriteRule ^ %1 [R=301,L] # URLs propres RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^([^/]+)/?$ $1.php [L] # Protection fichiers sensibles Order allow,deny Deny from all