IIS5 and IIRF 1.2.10 - Not always Rewrites

Topics: Developer Forum, User Forum
Sep 7, 2011 at 10:17 AM
Edited Sep 7, 2011 at 10:20 AM

Hi All,

On our Legacy server (windows server 2000) we have an old version of IIRF running.

We recently added some Conditions to the INI file that will ignore Rewrite for existing files and or directories. The Rule should do the following translation.

 

=== The Setup ============================

IN: /home

IF <input> = no real file with extension <defined in condition> or directory DO

  REWRITE /asp/appmain.asp/appactie=home

ELSE Ignore

=======================================

 

When looking at the logfile we see that IIRF sometimes does rewrite (which it should) and sometimes doesn't. There are no errors stated, just "No Rewrite".

Here is the logfile (well part of it):

 

Wed Sep 07 11:39:31 2011 - New Url: '/home'
Wed Sep 07 11:39:31 2011 - No Rewrite
Wed Sep 07 11:39:38 2011 - New Url: '/home'
Wed Sep 07 11:39:38 2011 - Rewrite Url to: '/asp/appmain.asp?appactie=home'
Wed Sep 07 11:39:38 2011 - New Url: '/xml/huur_winkelruimte.xml'
Wed Sep 07 11:39:38 2011 - No Rewrite
Wed Sep 07 11:39:39 2011 - New Url: '/js/controles_representatie.js'
Wed Sep 07 11:39:39 2011 - No Rewrite
Wed Sep 07 11:39:39 2011 - New Url: '/js/controles_library.js'
Wed Sep 07 11:39:39 2011 - No Rewrite
Wed Sep 07 11:39:39 2011 - New Url: '/js/sessielib.js'
Wed Sep 07 11:39:39 2011 - No Rewrite
Wed Sep 07 11:39:39 2011 - New Url: '/js/controles_library.js'
Wed Sep 07 11:39:39 2011 - No Rewrite
Wed Sep 07 11:39:39 2011 - New Url: '/js/sessielib.js'
Wed Sep 07 11:39:39 2011 - No Rewrite

 

 

The first time the request was made, IIRF failed to Rewrite. The second time (by pressing F5) it did Rewrite the URL. We have cleared the cache of the browser and restarted IIS to make sure there is no caching or anything conflicting.

Now this is an old version of the IIRF running on several machines: Windows 2003 , Windows 2008 and Windows 2000. We don't have the possibility to update since we will have to test all websites again. And there are a lot. We configure the IIRF on each website separately.

One of the newer servers (2003) works perfectly , using the same code and version of IIRF. The 2008 and 2000 only sometimes Rewite the URL.

INI File Content:

 

# IsapiRewrite4.ini

RewriteLog  D:\Inetpub\zakencentrum-nieuwegein\log\isapi2.log			
RewriteLogLevel 1

MaxMatchCount 20

RewriteCond %{HTTP_URL}             (/|\.foo|\.htm|\.php|\.html|.xml|.txt|.gz|/[^.]*)$   [I]
RewriteCond %{REQUEST_FILENAME}     !-f                                    
RewriteCond %{REQUEST_FILENAME}     !-d                    
RewriteRule ^/(.*) /asp/appmain.asp?appactie=$1 [I,L]

Can someone guide us into the right direction to fix the Rewrite on the two servers that sometimes decide to Rewrite and sometimes ignore the Rewrite Rule?

Thanks guys!

Coordinator
Sep 7, 2011 at 11:11 AM

I don't know what's happening. If this were my website I'd look in the IIRF log files, first.

I'd also look into converting to IIRF v2.x.

Good luck! 

Sep 9, 2011 at 7:18 AM

Hi Cheeso,

Thanks for your input. Unfortunately we don't have the luxury to change versions just like that. We need to test all individual configurations and their INI files with Rules and Conditions. I have provided some logging on level 1 in my original post. The Level 5 log doesn't add any error messages so didn't seem necessary to post more then this.

The logging doesn't show any errors. The Rewrite and conditions work perfect on our development server. It's when we use the same settings on the Windows 2000 Test server and 2008 production when they sometimes return the message "Page not found".

I hoped there were some settings in IIS that I needed to change or check. I'll look into the new version. If any idea's come into mind to perhaps fix our old version, please let me know.

Thanks!

Coordinator
Sep 9, 2011 at 9:12 PM

nope - I do not support v1.2.  I don't even have IIRF v1.2.   There will be no fixes, and I won't look into what the problem might be.

 

Sep 12, 2011 at 7:25 AM

No worries, thanks for your help.

We'll look into the option to upgrade on the newer servers.

Bas