File tree Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Expand file tree Collapse file tree 2 files changed +17
-13
lines changed Original file line number Diff line number Diff line change @@ -1836,15 +1836,9 @@ protected function prepareBaseUrl()
18361836 }
18371837
18381838 $ basename = basename ($ baseUrl );
1839- if (empty ($ basename ) || !strpos (rawurldecode ($ truncatedRequestUri ).'/ ' , '/ ' .$ basename .'/ ' )) {
1840- // strip autoindex filename, for virtualhost based on URL path
1841- $ baseUrl = \dirname ($ baseUrl ).'/ ' ;
1842-
1843- $ basename = basename ($ baseUrl );
1844- if (empty ($ basename ) || !strpos (rawurldecode ($ truncatedRequestUri ).'/ ' , '/ ' .$ basename .'/ ' )) {
1845- // no match whatsoever; set it blank
1846- return '' ;
1847- }
1839+ if (empty ($ basename ) || !strpos (rawurldecode ($ truncatedRequestUri ), $ basename )) {
1840+ // no match whatsoever; set it blank
1841+ return '' ;
18481842 }
18491843
18501844 // If using mod_rewrite or ISAPI_Rewrite strip the script filename
Original file line number Diff line number Diff line change @@ -1770,8 +1770,8 @@ public function getBaseUrlData()
17701770 'SCRIPT_NAME ' => '/foo/app.php ' ,
17711771 'PHP_SELF ' => '/foo/app.php ' ,
17721772 ],
1773- '/sub/foo ' ,
1774- '/bar ' ,
1773+ '' ,
1774+ '/sub/foo/ bar ' ,
17751775 ],
17761776 [
17771777 '/sub/foo/app.php/bar ' ,
@@ -1790,8 +1790,18 @@ public function getBaseUrlData()
17901790 'SCRIPT_NAME ' => '/foo/app2.phpx ' ,
17911791 'PHP_SELF ' => '/foo/app2.phpx ' ,
17921792 ],
1793- '/sub/foo ' ,
1794- '/bar/baz ' ,
1793+ '' ,
1794+ '/sub/foo/bar/baz ' ,
1795+ ],
1796+ [
1797+ '/foo/api/bar ' ,
1798+ [
1799+ 'SCRIPT_FILENAME ' => '/var/www/api/index.php ' ,
1800+ 'SCRIPT_NAME ' => '/api/index.php ' ,
1801+ 'PHP_SELF ' => '/api/index.php ' ,
1802+ ],
1803+ '' ,
1804+ '/foo/api/bar ' ,
17951805 ],
17961806 ];
17971807 }
You can’t perform that action at this time.
0 commit comments