Isapi Rewrite on IIS6 and Drupal6

Topics: User Forum
Oct 26, 2009 at 9:16 AM

I try to configure Isapi Rewrite Filter with IIS6 - PHP 5.2.11 and Drupal 6.14
'Clean URLs' feature was enabled in Drupal (so I suppose that rewrite filter is correctly enabled), but actually cannot access to URLs like this:

Instead, this one works correctly:

Isapi Rewrite Filter version's IonicIsapiRewriter-1.2.16

A part of .htaccess processed in Drupal root:

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} !=/favicon.ico
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

What's the trouble with this config?

Oct 26, 2009 at 5:52 PM

I can't tell what problem you're having.

First, you said you have the 'Clean URLs' feature enabled in Drupal,. and from that you suppose that the rewrite filter is correctly enabled.  I don't know about Drupal on IIS, and I am not sure if configuring Drupal that way, will enable IIRF.  It could be that the "clean URLs" feature in Drupal does not depend on IIRF at all.  I am not aware that it does.  Are you sure?  Are you sure that by checking the "Clean Urls" feature, that IIRF is enabled? Have you downloaded and installed IIRF yourself?  I don't believe that installing Drupal will automatically install IIRF.

Supposing that you do have IIRF enabled, there's one problem with one of your RewriteCond statements. I've fixed it in the below text.

  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_URI} (?!favicon.ico)$
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Also, you are showing me the file with the name .htaccess.  But IIRF will not read a file by that name.  IIRF v1.2.16 depends on a file with the name IsapiRewrite4.ini . If your rules are not inserted into a file of that name, IIRF will not read the file.   (This is another reason I suspect IIRF is not enabled on your server).

Finally, you said you have a problem, and that "it doesn't work correctly".  When configured properly, IIRF produces a logfile that contains messages indicating which rules are processed for each URL request.  If you have IIRF configured and enabled, this logfile will show what is happening.  Use the RewriteLog statement to configure the location of the logfile. 

Good luck.


Nov 10, 2009 at 2:54 AM

Hi, Cheeso

It will be very helpful for us if you can show some light on how to configure IIRF (IIS 6) for Drupal 6. I'm having a difficult time in making it work. Thanks you.

Nov 10, 2009 at 3:03 AM

Ok, as I said, I don't know Drupal, so I can't help with that.   I know IIRF.

Nov 10, 2009 at 4:42 AM


Everytime I put DrupalRules.ini in my root directory, I can't access http://localhost/iirfStatus or any website any more.  Anyway, I managed to installed. I need to put all Drupal files and folders on the root level with Iirf.ini. My first setup was Drupal was in a sub-folder and it didn't work. Is there anything I need to do so I can actually put Drupal in a sub folder of the root directory ? Because if I didn't put Drupal on root level, I can enable the Clearn URL in Drupal. My configuration is for site-specific setting. Because I want another web app in a sub directory to have clean URL also.

Nov 10, 2009 at 5:54 AM

I don't know what you're talking about.  I don't know what drupalrules.ini is.   I don't know about Drupal and sub-folders.  I don't know Drupal.



Nov 10, 2009 at 6:18 AM



DrupalRules.ini came with IonicIsapiRewriter-2.0-Release-bin\ExampleIniFiles. But I renamed it to Iirf.ini and put it at the root directory level along with Drupal files and folders. It's working this way.


Anyway, Thank a lot for IonicIsapiRewriter.

Nov 10, 2009 at 12:34 PM

Ahh, oh, thanks.  The drupalrules.ini - I had forgotten about that. Someone else contributed it and I just put it in the release as an example.