fix(server): exclude /ajax/ from .php redirect to preserve POST
Déploiement PROD / check (push) Successful in 3m23s
Déploiement PROD / deploy (push) Successful in 8s

This commit is contained in:
2026-07-26 19:55:18 +04:00
parent 98c2818c3f
commit 5c726f91b2
2 changed files with 7 additions and 0 deletions
+2
View File
@@ -40,7 +40,9 @@ RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^([^\.]+)$ $1.php [NC,L]
# Rediriger les URLs avec .php vers les URLs sans extension
# Sauf /ajax/ : un 301 transformerait le POST en GET et ferait perdre le token CSRF.
RewriteCond %{THE_REQUEST} /([^.]+)\.php [NC]
RewriteCond %{REQUEST_URI} !^/ajax/ [NC]
RewriteRule ^ /%1 [NC,L,R=301]
# Pour accéder à page.php via /page