diff --git a/.htaccess b/.htaccess index 9bd3ba5..826eb7c 100644 --- a/.htaccess +++ b/.htaccess @@ -32,5 +32,13 @@ Options -Indexes Options -MultiViews + # 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 + diff --git a/core/module/config/config.php b/core/module/config/config.php index 282f901..0de3a8a 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -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 . '' . PHP_EOL . "\tRewriteEngine on" . PHP_EOL .