From 0fbe39262f2c36400c7208038a83a44f48b86abe Mon Sep 17 00:00:00 2001 From: Sam Minnee Date: Thu, 14 May 2009 23:14:51 +0000 Subject: [PATCH] BUGFIX: Fix URL parsing for certain IIS configurations. git-svn-id: svn://svn.silverstripe.com/silverstripe/open/modules/sapphire/trunk@76897 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- main.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/main.php b/main.php index b06355666..7ba72de00 100644 --- a/main.php +++ b/main.php @@ -67,6 +67,11 @@ if (function_exists('mb_http_output')) { Session::start(); +// IIS will sometimes generate this. +if(!empty($_SERVER['HTTP_X_ORIGINAL_URL'])) { + $_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_ORIGINAL_URL']; +} + // Apache rewrite rules use this if (isset($_GET['url'])) { $url = $_GET['url'];