From: Tim Düsterhus Date: Wed, 10 Feb 2021 15:28:47 +0000 (+0100) Subject: Add `RewriteEngine On` to generated Apache mod_rewrite rules X-Git-Tag: 5.4.0_Alpha_1~289 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=5f3d5209868a629c4b512c3648f382c2dc3bd5a3;p=GitHub%2FWoltLab%2FWCF.git Add `RewriteEngine On` to generated Apache mod_rewrite rules Resolves #3930 --- diff --git a/wcfsetup/install/files/lib/data/option/OptionAction.class.php b/wcfsetup/install/files/lib/data/option/OptionAction.class.php index 1d0b7ce563..661dd51d38 100644 --- a/wcfsetup/install/files/lib/data/option/OptionAction.class.php +++ b/wcfsetup/install/files/lib/data/option/OptionAction.class.php @@ -203,7 +203,7 @@ RewriteRule ^{$path}(.*)$ {$path}index.php?$1 [L,QSA] SNIPPET; if (empty($rules['apache'][$htaccess])) { - $rules['apache'][$htaccess] = $content; + $rules['apache'][$htaccess] = "RewriteEngine On\n\n{$content}"; } else { $rules['apache'][$htaccess] .= $content; }