Htaccess avec anti slash dans tous les cas

This commit is contained in:
Fred Tempez 2024-06-02 14:34:56 +02:00
parent 96b12bf0d4
commit b86f7fbd4a
2 changed files with 2 additions and 6 deletions

View File

@ -39,8 +39,10 @@ Options -Indexes
RewriteRule ^ %1 [R=301,L]
# ne pas supprimer la ligne URL rewriting !
# URL rewriting

View File

@ -524,12 +524,6 @@ class config extends common
// Ajout des lignes dans le .htaccess
$fileContent = file_get_contents('.htaccess');
$rewriteData = PHP_EOL .
' # Enlever le slash final des URL' . PHP_EOL .
'RewriteCond %{REQUEST_FILENAME} !-f' . PHP_EOL .
'RewriteCond %{REQUEST_FILENAME} !-d' . PHP_EOL .
'RewriteCond %{REQUEST_URI} ^(.+)/$' . PHP_EOL .
'RewriteRule ^ %1 [R=301,L]' . PHP_EOL .
PHP_EOL .
'# URL rewriting' . PHP_EOL .
'<IfModule mod_rewrite.c>' . PHP_EOL .
"\tRewriteEngine on" . PHP_EOL .