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:
@@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user