diff --git a/src/AbstractWebApplication.php b/src/AbstractWebApplication.php index 23464c00..8b69f0b7 100644 --- a/src/AbstractWebApplication.php +++ b/src/AbstractWebApplication.php @@ -817,7 +817,11 @@ protected function detectRequestUri() } else { // If not in "Apache Mode" we will assume that we are in an IIS environment and proceed. // IIS uses the SCRIPT_NAME variable instead of a REQUEST_URI variable... thanks, MS - $uri .= $this->input->server->getString('SCRIPT_NAME'); + $scriptname = $this->input->server->getString('SCRIPT_NAME'); + if (!str_starts_with($scriptname, '/') && !str_ends_with($uri, '/')) { + $uri .= '/'; + } + $uri .= $scriptname; $queryHost = $this->input->server->getString('QUERY_STRING', ''); // If the QUERY_STRING variable exists append it to the URI string.