diff options
author | David King <imkingdavid@gmail.com> | 2013-09-02 09:43:41 -0700 |
---|---|---|
committer | David King <imkingdavid@gmail.com> | 2013-09-02 09:43:41 -0700 |
commit | 9d48ee446b10e492b83448c3778b48729839b788 (patch) | |
tree | fe78d14cbeb9f32ec00ebe6a7136854dac2e543b /phpBB/includes/functions.php | |
parent | 1b1dd01391337c4a13af012cbdae7f34aa9949ee (diff) | |
download | forums-9d48ee446b10e492b83448c3778b48729839b788.tar forums-9d48ee446b10e492b83448c3778b48729839b788.tar.gz forums-9d48ee446b10e492b83448c3778b48729839b788.tar.bz2 forums-9d48ee446b10e492b83448c3778b48729839b788.tar.xz forums-9d48ee446b10e492b83448c3778b48729839b788.zip |
[ticket/11215] Add commented-out URL rewrite capability to .htaccess
PHPBB3-11215
Diffstat (limited to 'phpBB/includes/functions.php')
-rw-r--r-- | phpBB/includes/functions.php | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/phpBB/includes/functions.php b/phpBB/includes/functions.php index d85606944f..4d2d704a43 100644 --- a/phpBB/includes/functions.php +++ b/phpBB/includes/functions.php @@ -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; } |