From e42f0bd538a8b34460d28f65a1a8b768772c406e Mon Sep 17 00:00:00 2001 From: Fred Tempez Date: Sun, 2 Jun 2024 14:40:34 +0200 Subject: [PATCH] Lignes vides en trop dans htaccess --- .htaccess | 1 - core/module/config/config.php | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.htaccess b/.htaccess index e9850449..6f67400a 100644 --- a/.htaccess +++ b/.htaccess @@ -39,7 +39,6 @@ Options -Indexes 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 a55a2b0b..4cd11ff3 100644 --- a/core/module/config/config.php +++ b/core/module/config/config.php @@ -523,7 +523,7 @@ class config extends common ) { // Ajout des lignes dans le .htaccess $fileContent = file_get_contents('.htaccess'); - $rewriteData = PHP_EOL . + $rewriteData = '# URL rewriting' . PHP_EOL . '' . PHP_EOL . "\tRewriteEngine on" . PHP_EOL . @@ -532,7 +532,7 @@ class config extends common "\tRewriteCond %{REQUEST_FILENAME} !-d" . PHP_EOL . "\tRewriteRule ^(.*)$ index.php?$1 [L]" . PHP_EOL . '' . PHP_EOL . - '# URL rewriting' . PHP_EOL; + '# URL rewriting'; $fileContent = str_replace('# URL rewriting', $rewriteData, $fileContent); $this->secure_file_put_contents( '.htaccess',