mirror of
https://github.com/phpbb/phpbb.git
synced 2025-07-31 14:00:31 +02:00
[ticket/11824] Add option for mod_rewrite
PHPBB3-11824
This commit is contained in:
@@ -5733,6 +5733,7 @@ function phpbb_create_symfony_request(phpbb_request $request)
|
||||
*/
|
||||
function phpbb_get_web_root_path(Request $symfony_request, $phpbb_root_path = '')
|
||||
{
|
||||
global $config, $phpEx, $request;
|
||||
static $path;
|
||||
if (null !== $path)
|
||||
{
|
||||
@@ -5748,9 +5749,8 @@ 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)
|
||||
// We need to account for whether or not app.php is in the URL
|
||||
if (strpos($symfony_request->server->get('REQUEST_URI', ''), 'app.' . $phpEx) !== false)
|
||||
{
|
||||
$corrections -= 1;
|
||||
}
|
||||
|
Reference in New Issue
Block a user