Skip to content

Commit

Permalink
Merge pull request #296 from sreichel/fix/iis
Browse files Browse the repository at this point in the history
Apply Magento 1.9.0.0 change
  • Loading branch information
Shardj authored Jan 11, 2023
2 parents dadd0c2 + 9d68215 commit d147f02
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions library/Zend/Controller/Request/Http.php
Original file line number Diff line number Diff line change
Expand Up @@ -390,13 +390,19 @@ public function getEnv($key = null, $default = null)
public function setRequestUri($requestUri = null)
{
if ($requestUri === null) {
if (
if (isset($_SERVER['HTTP_X_ORIGINAL_URL'])) {
// IIS with Microsoft Rewrite Module
$requestUri = $_SERVER['HTTP_X_ORIGINAL_URL'];
} elseif (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
// IIS with ISAPI_Rewrite
$requestUri = $_SERVER['HTTP_X_REWRITE_URL'];
} elseif (
// IIS7 with URL Rewrite: make sure we get the unencoded url (double slash problem)
isset($_SERVER['IIS_WasUrlRewritten'])
&& $_SERVER['IIS_WasUrlRewritten'] == '1'
&& isset($_SERVER['UNENCODED_URL'])
&& $_SERVER['UNENCODED_URL'] != ''
) {
) {
$requestUri = $_SERVER['UNENCODED_URL'];
} elseif (isset($_SERVER['REQUEST_URI'])) {
$requestUri = $_SERVER['REQUEST_URI'];
Expand Down

0 comments on commit d147f02

Please sign in to comment.