[TYPO3] RealURL on Windows using IIS ?

Karl-Ernst Kiel kekiel at kekiel.de
Tue May 8 12:18:03 CEST 2007


Hi!

This is how I got it working on Win2003, IIS 6, TYPO3 4.1.1 :

1.) Installed ISAPI_rewrite lite (www.isapirewrite.com)

2.) Added this rule to the httpd.ini (ISAPI_rewrite installation folder)

RewriteRule ^/[^/]*\.html$  /index\.php [L]

(see http://wiki.typo3.org/index.php/Windows#ISAPI_Rewrite )

3.) Added this line to my localconf.php

$TYPO3_CONF_VARS['SYS']['requestURIvar'] = '_SERVER|HTTP_X_REWRITE_URL';

(see 
http://lists.netfielders.de/pipermail/typo3-team-core/2007-January/007050.html 
)

4.) Patched the TYPO3 core code
(see http://bugs.typo3.org/view.php?id=5578 )

file /t3lib/class.t3lib_div.php , function getIndpEnv (line 3017 in 
TYPO3 4.1.1)

original version:

case 'REQUEST_URI':
	// Typical application of REQUEST_URI is return urls, forms submitting 
to itself etc. Example: 
returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))
if ($GLOBALS['TYPO3_CONF_VAR']['SYS']['requestURIvar'])	{	// This is for 
URL rewriters that store the original URI in a server variable (eg 
ISAPI_Rewriter for IIS: HTTP_X_REWRITE_URL)
	list($v,$n) = 
explode('|',$GLOBALS['TYPO3_CONF_VAR']['SYS']['requestURIvar']);
	$retVal = $GLOBALS[$v][$n];

changed:

case 'REQUEST_URI':
	// Typical application of REQUEST_URI is return urls, forms submitting 
to itself etc. Example: 
returnUrl='.rawurlencode(t3lib_div::getIndpEnv('REQUEST_URI'))
if ($GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar'])	{	// This is 
for URL rewriters that store the original URI in a server variable (eg 
ISAPI_Rewriter for IIS: HTTP_X_REWRITE_URL)
	list($v,$n) = 
explode('|',$GLOBALS['TYPO3_CONF_VARS']['SYS']['requestURIvar']);
	$retVal = $GLOBALS[$v][$n];

(so it´s only the "S" missing in $GLOBALS['TYPO3_CONF_VAR  ...)

Maybe this will be patched in Version 4.1.2 ?!?

Greetings,
Karl-E.


More information about the TYPO3-english mailing list