[Typo3-dev] IIS and REQUEST_URI
Bjoern Kraus
krausbn at php.net
Fri Oct 14 12:34:48 CEST 2005
Hi!
I'm currently testing RealURL on IIS with an isapi filter for rewriting
the URL. There seems to be a problem since the Typo3 only displays the
root page - no matter which page is called.
The problem why Typo3 can't return the correct page is that IIS doesn't
have the 'REQUEST_URI' variable in $_SERVER. The synonym for this seems
to be 'HTTP_SCRIPT_URL'. So I decided to add four lines in the
'getIndpEnv' function (class.t3lib_div.php):
case 'REQUEST_URI':
if (!$_SERVER['REQUEST_URI']) {
--> if (isset($_SERVER['HTTP_SCRIPT_URL'])) {
--> return $_SERVER['HTTP_SCRIPT_URL'];
--> } else {
return '/'.ereg_replace('^/','',t3lib_div::getIndpEnv('SCRIPT_NAME')).
($_SERVER['QUERY_STRING']?'?'.$_SERVER['QUERY_STRING']:'');
--> }
} else return $_SERVER['REQUEST_URI'];
break;
And voila, RealURL works in IIS :)
Before filling out a bug report: Can someone proof this solution and
give me a short message?
Regards
Bjoern
More information about the TYPO3-dev
mailing list