From b9ea9fe722e92c5a96d96dd43c4746b247981482 Mon Sep 17 00:00:00 2001 From: mutec Date: Sun, 5 Jan 2020 14:29:21 +0100 Subject: [PATCH] fix htaccess generation --- .../install/files/lib/data/option/OptionAction.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/wcfsetup/install/files/lib/data/option/OptionAction.class.php b/wcfsetup/install/files/lib/data/option/OptionAction.class.php index 8dcfee9ac1..c78ba010e4 100644 --- a/wcfsetup/install/files/lib/data/option/OptionAction.class.php +++ b/wcfsetup/install/files/lib/data/option/OptionAction.class.php @@ -171,11 +171,12 @@ class OptionAction extends AbstractDatabaseObjectAction { foreach ($domainPaths as $domainPath => $value) { $htaccess = "{$dir}.htaccess"; - $path = FileUtil::removeTrailingSlash(substr($value, strlen($dir))); + $path = FileUtil::addTrailingSlash(substr($value, strlen($dir))); + if ($path == '/') $path = ''; $content = <<