nouvel htaccess

This commit is contained in:
Fred Tempez 2024-06-02 14:33:59 +02:00
parent 751bc450b5
commit 2c459a03d4
2 changed files with 8 additions and 6 deletions

View File

@ -32,5 +32,13 @@ Options -Indexes
Options -MultiViews
</IfModule>
# Enlever le slash final des URL
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} ^(.+)/$
RewriteRule ^ %1 [R=301,L]
# ne pas supprimer la ligne URL rewriting !
# URL rewriting

View File

@ -557,12 +557,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 .