소스 검색

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 `/`
tags/v9.1.0beta1
Lukas Reschke 8 년 전
부모
커밋
df8b851f53
No account linked to committer's email address
1개의 변경된 파일9개의 추가작업 그리고 1개의 파일을 삭제
  1. 9
    1
      lib/private/setup.php

+ 9
- 1
lib/private/setup.php 파일 보기

@@ -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>";

Loading…
취소
저장