File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -63,27 +63,28 @@ function _get_uri($relativePath = '', ?App $config = null): URI
6363 $ request = Services::request ();
6464
6565 if ($ config === null ) {
66- $ url = $ request instanceof CLIRequest
66+ $ baseURL = $ request instanceof CLIRequest
6767 ? rtrim ($ appConfig ->baseURL , '/ ' ) . '/ '
6868 // Use the current baseURL for multiple domain support
6969 : $ request ->getUri ()->getBaseURL ();
7070
7171 $ config = $ appConfig ;
7272 } else {
73- $ url = rtrim ($ config ->baseURL , '/ ' ) . '/ ' ;
73+ $ baseURL = rtrim ($ config ->baseURL , '/ ' ) . '/ ' ;
7474 }
7575
7676 // Check for an index page
77+ $ indexPage = '' ;
7778 if ($ config ->indexPage !== '' ) {
78- $ url . = $ config ->indexPage ;
79+ $ indexPage = $ config ->indexPage ;
7980
8081 // Check if we need a separator
8182 if ($ relativePath !== '' && $ relativePath [0 ] !== '/ ' && $ relativePath [0 ] !== '? ' ) {
82- $ url .= '/ ' ;
83+ $ indexPage .= '/ ' ;
8384 }
8485 }
8586
86- $ uri = new URI ($ url . $ relativePath );
87+ $ uri = new URI ($ baseURL . $ indexPage . $ relativePath );
8788
8889 // Check if the baseURL scheme needs to be coerced into its secure version
8990 if ($ config ->forceGlobalSecureRequests && $ uri ->getScheme () === 'http ' ) {
You can’t perform that action at this time.
0 commit comments