[TYPO3-core] Making Real URL work for IIS
Martin Kutschker
Martin.Kutschker at n0spam-blackbox.net
Thu Jan 4 16:17:24 CET 2007
Dmitry Dulepov schrieb:
> Hi!
>
> Martin Kutschker wrote:
>
>> For IIS there exist several mod_rewrite equivalents. I have tested two
>> of them: ISAPI_rewrite (free "lite" version) [1] and mod_rewrite (GPL)
>> [2].
>>
>> Both have one in common: They change REQUEST_URI, so Real URL breaks.
>> But there is a solution to it.
>
>
> <skip>
>
>> So to make use of these I suggest, we add a configuration setting from
>> which global variable REQUEST_URI is to retrieve:
>>
>> case 'REQUEST_URI':
>> if ($GLOBALS['TYPO3_CONF_VAR']['SYS']['requestURI']) {
>> list($v,$n) =
>> split('|',$GLOBALS['TYPO3_CONF_VAR']['SYS']['requestURI']);
>> $retVal = $GLOBALS[$v][$n];
>> } elseif (!$_SERVER['REQUEST_URI']) {
>> ...
>> }
>
>
> Why we simply cannot check for HTTP_X_REWRITE_URL first and then for
> REQUEST_URI? This is less flexible but avoids extra settings and shorter...
Because neither mod_rewrite (for IIS) nor IIS-Rewrite use it. The former
doesn't set any header *, the latter sets HTTP_SCRIPT_URL.
And so we're flexible for other rewriters.
Masi
* As mod_rewrite for IIS is open source we could try to get them to set a
header of our choice :-)
More information about the TYPO3-team-core
mailing list