1
0
mirror of https://github.com/phpbb/phpbb.git synced 2025-08-05 16:27:38 +02:00

[ticket/11215] Add commented-out URL rewrite capability to .htaccess

PHPBB3-11215
This commit is contained in:
David King
2013-09-02 09:43:41 -07:00
parent 1b1dd01391
commit 9d48ee446b
2 changed files with 34 additions and 4 deletions

View File

@@ -5747,6 +5747,14 @@ function phpbb_get_web_root_path(Request $symfony_request, $phpbb_root_path = ''
}
$corrections = substr_count($path_info, '/');
// When URL Rewriting is enabled, app.php is optional. We have to
// correct for it not being there
if (strpos($symfony_request->getRequestUri(), $symfony_request->getScriptName()) === false)
{
$corrections -= 1;
}
$path = $phpbb_root_path . str_repeat('../', $corrections);
return $path;
}