Download & Extend

HowTo: Drupal 6, IIS6 and ISAPI_Rewrite 3

Project:ImageCache
Version:6.x-2.0-beta9
Component:Documentation
Category:feature request
Priority:normal
Assigned:Unassigned
Status:active

Issue Summary

You can use ISAPI_Rewrite 3 to enable clean urls in drupal.

http://www.helicontech.com/isapi_rewrite/

http://www.helicontech.com/articles/drupal.htm

ISAPI_Rewrite only finds the closest .htaccess file so it doesn't find the parent .htaccess file with rewrite rules.

Fixed by adding following rules to the bottom of "sites/default/files/.htaccess" from main ".htaccess" and then editing to accommodate new location.

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

ImageCache then works perfectly.

Comments

#1

Tried this, does this code work with the ISAPI "Lite" version? Didn't work for me.

#2

I tried this with ISAPI_Rewrite full version, but since my drupal installation is in a subfolder (home), the rewrite snippet dosn't work.
This worked:

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico

RewriteRule ^(.*)$ /home/index.php?q=sites/default/files/$1 [L,QSA]
nobody click here