Skip to content
Snippets Groups Projects
Unverified Commit df8b851f authored by Lukas Reschke's avatar Lukas Reschke
Browse files

Don't write empty RewriteBase

ownCloud may be configured to live at the root folder without a
trailing slash being specified. In this case manually set the
rewrite base to `/`
parent 14c34919
No related branches found
No related tags found
No related merge requests found
......@@ -427,10 +427,18 @@ class Setup {
//custom 404 error page
$content.= "\nErrorDocument 404 ".$webRoot."/core/templates/404.php";
// ownCloud may be configured to live at the root folder without a
// trailing slash being specified. In this case manually set the
// rewrite base to `/`
$rewriteBase = $webRoot;
if($webRoot === '') {
$rewriteBase = '/';
}
// Add rewrite base
$content .= "\n<IfModule mod_rewrite.c>";
$content .= "\n RewriteRule . index.php [PT,E=PATH_INFO:$1]";
$content .= "\n RewriteBase ".$webRoot;
$content .= "\n RewriteBase ".$rewriteBase;
$content .= "\n <IfModule mod_env.c>";
$content .= "\n SetEnv front_controller_active true";
$content .= "\n <IfModule mod_dir.c>";
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment