[TYPO3-windows] URL Rewriting with IIS

Mohr, Andreas andreas.mohr at teraport.de
Tue Oct 23 18:10:24 CEST 2007


Fred,

yes, the bug might be resolved like this: make sure you have configured the following in localconf.php
$TYPO3_CONF_VARS['SYS']['requestURIvar'] = '_SERVER|HTTP_X_REWRITE_URL';

for typo3 I have a configuration section in my template which looks like this:

##########################################
# real url
config.simulateStaticDocuments = 0
config.baseURL = http://localhost/
[globalString = IENV:TYPO3_SITE_URL=http://intranet.cav-gt.com/]
	config.baseURL = http://alias.domain.com/
[globalString = IENV:TYPO3_SITE_URL=http://c-s1-intra1.cav-gt.com/]
	config.baseURL = http://hostname.domain.com/
[global]
config.tx_realurl_enable = 1
config.prefixLocalAnchors = all

I also got a 404 error until these settings were made. If the base URLs are not set in globalString parameters, obviously RealURL cannot process HTTP Requests for the URLs beginning with the same.

For the rewrite rule in ISAPI rewrite I hav found some differences to my rewrite rule, which is: 

RewriteRule ^typo3$ - [L]
RewriteRule ^typo3/.*$ - [L]

RewriteRule ^uploads/.*$ - [L]
RewriteRule ^fileadmin/.*$ - [L]
RewriteRule ^typo3conf/.*$ - [L]
RewriteRule ^ili_intranet/.*$ - [L]
RewriteRule ^ili_normen/.*$ - [L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule .* index.php 

After trying the settings above, if you still have trouble try adding ISAPI_Rewrite.dll to the list of allowed Web Service Extensions for IIS with the Management Console. After I installed ISAPI Rewrite, I had it in the list... but currently it is not there anymore...??? So this might not be any help but it is worth a try ;o)

Best luck 
Andreas


 

-----Original Message-----
From: typo3-windows-bounces at lists.netfielders.de [mailto:typo3-windows-bounces at lists.netfielders.de] On Behalf Of Fred
Sent: Monday, October 22, 2007 4:54 PM
To: typo3-windows at lists.netfielders.de
Subject: Re: [TYPO3-windows] URL Rewriting with IIS


So...
It's working, but not completly.
The url is well-generated mydomain.com/fr/rub/index.html
But the page is a 404 error.
In ISAPI I set :

// Disable static document simulation
config.simulateStaticDocuments = 0
// Prefix anchors
config.prefixLocalAnchors = all
// Base tag
config.baseURL = 1
// Enable RealURL
config.tx_realurl_enable = 1

In localconf.php :

<?php
/** RealURL configuration */

    $TYPO3_CONF_VARS['EXTCONF']['realurl'] = array(
   
 // Default host
 '_DEFAULT' => array(
    
     // General configuration
     'init' => array(
   'doNotRawUrlEncodeParameterNames' => 0,
   'enableCHashCache' => 1,
   'respectSimulateStaticURLs' => 1,
   'appendMIssingSlash' => 1,
   'adminJumpToBackend' => 0,
   'enableUrlDecodeCache' => 1,
   'enableUrlEncodeCache' => 1,
     ),
    
     // Redirections
     'redirects' => array(),
    
     // Pre variables
     'preVars' => array(
  
   // No cache
   array(
       'GETvar' => 'no_cache',
       'valueMap' => array(
     'no_cache' => 1,
       ),
       'noMatch' => 'bypass',
   ),
  
   // Language
   array(
       'GETvar' => 'L',
       'valueMap' => array(
     'fr' => '0',
       ),
       'valueDefault' => 'fr',
   ),
     ),
    
     // Transformation method
     'pagePath' => array(
   'type' => 'user',
   'userFunc' => 
'EXT:realurl/class.tx_realurl_advanced.php:&tx_realurl_advanced->main',
   'spaceCharacter' => '-',
   'languageGetVar' => 'L',
   'expireDays' => 3,
     ),
    
     // Fixed post variables
     'fixedPostVars' => array(),
    
     // Post variables
     'postVarsSets' => array(
   '_DEFAULT' => array(),
     ),
    
     // File names
     'fileName' => array(
   'index' => array(
       'index.html' => array(
     'keyValues' => array(),
       ),
   ),
     ),
 ),
    );
?>

Fred a écrit :
> May thy name be thanked till Typo3 5 !
> I'll try this and give you a feedback as soon as possible !
>
> Mohr, Andreas a écrit :
>> Fred,
>> Do not go after Wiki if you are using Typo3 4.x. What you find in 
>> WIKI on 3.8.1. does not apply to the new version.
>>
>> Good luck, anyways. I had help from "outside" ;o)
>> Andi
>>
>> *************************************************
>> Andreas Mohr Software Entwicklung IT Services
>> Teraport GmbH
>> Riedwiesenstraße 1 D-71229 Leonberg
>> Tel.:      +49 (0)7152 355-6460  Fax:      +49 (0)7152 355-6464  
>> Mobil:   +49 (0)176 41072972
>>
>> andreas.mohr at teraport.de
>> Web: http://www.teraport.de/
>> *************************************************
>> Sitz der Gesellschaft: Leonberg
>> Registergericht Stuttgart HRB 253381
>> Geschäftsführer: Michael Grünschloß, Stefan Ahrens, Hermann Gaigl
>>
>>
>> -----Original Message-----
>> From: typo3-windows-bounces at lists.netfielders.de 
>> [mailto:typo3-windows-bounces at lists.netfielders.de] On Behalf Of 
>> Michiel Roos
>> Sent: Wednesday, October 17, 2007 5:38 PM
>> To: typo3-windows at lists.netfielders.de
>> Subject: Re: [TYPO3-windows] URL Rewriting with IIS
>>
>>
>> Fred wrote:
>>  
>>> Hello.
>>>
>>> I have to install two typo3 websites on a IIS server.
>>> I'd like to configure an url rewriting but I can't find how exactly. 
>>> In fact there seems to be many ways but, as a newbie, I'm not sure 
>>> of what to do.
>>> I don't know if I'd better use coolUrl or realUrl and I don't know 
>>> how to configure IIS.
>>>
>>> Can you help me, please ?
>>>     
>>
>> Hi Fred,
>>
>> I wish you all the mental strength in the world. . .
>>
>> http://wiki.typo3.org/index.php/Windows#ISAPI_Rewrite
>>
>> Kind regards,
>>
>>
>> Michiel Roos
>>
>>   
_______________________________________________
TYPO3-windows mailing list
TYPO3-windows at lists.netfielders.de
http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-windows


More information about the TYPO3-windows mailing list