To sum it all up I failed completely with the Lite version. I was banging my head against a wall, I’d tried everything. In the end by downloading the Full version (which has a 45 day free trial) everything started working instantly. I am hosting quite a few sites on my server and my new Drupal site wasn’t my default site so it might have been that that was messing things up.

*Update*

This post is now quite redundant. If you’re thinking of paying for the full version of ISAPI_Rewrite3 or even thinking of trying the free Lite version, I strongly suggest that you save yourself the time and effort and $99 and download Ionic Shade’s IIRF (which is very powerful, fully featured and completely FREE) and then follow this tutorial I’ve written for you, which will walk you through every step of the way of setting IIRF up on your Windows 2003 server.

Download the FULL, FREE version or IIRF from here:

http://cheeso.members.winisp.net/IIRF.aspx

Then follow my tutorial/walk-through for setting it up that works with Drupal (any version) and WordPress (any version)

http://www.caspianit.co.uk/iirf-drupal-and-iis6/

There is a free version of Mod Rewrite called ISAPI_Rewrite Lite that should get clean URLs working for IIS.

Just visit http://www.helicontech.com/download-isapi_rewrite3.htm and download the Lite version.

Just click on the link above, download the Lite version and copy to your server.

Then right-click on the .msi file and then click on install. If you host with an ISP you will need to get them to install it for you. (If they won’t do this consider pissing them of and hosting Drupal yourself on you own home computer – yes that’s right, self hosting is really the way to go as long as you’re not getting 2000 visits a day!) To find out how to do this have a look at:  this post.

In the httpd.ini file which is probable located here "C:\Program Files\Helicon\ISAPI_Rewrite\" you will need to write to this so untick 'Read Only' in the file properties. Then add this code.

[ISAPI_Rewrite]

# Defend your computer from some worm attacks
RewriteRule .*(?:global.asa|default\.ida|root\.exe|\.\.).* . [F,I,O]

RewriteEngine on
RewriteBase /
RewriteCond %{HTTP:Host} ^(?:www\.)?resorthotelsonline\.com$
RewriteCond %{HTTP:Host} ^(?:www\.)?sciencegossip\.co.uk$
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Then in the file settings.php (which is part of the Drupal installation site\default\settings.php) you need to add the code at the bottom of the page:

// Isapi_Rewrite 3.x
if (isset($_SERVER['HTTP_X_REWRITE_URL'])) {
$_SERVER['REQUEST_URI'] = $_SERVER['HTTP_X_REWRITE_URL'];
}

If you’re using Drupal 6.x that’s it you’re good to go. You should be able to ‘Administer’ your website and enable friendly URLs.

Now someone might actually find you in the search engines!

All the best

Sci-Fi Si.

General configuration:

  1. Make sure IIS_WPG and NETWORK SERVICE have access to the .htaccess file – otherwise ISAPI_Rewrite cannot read the configuration httpd.ini (2.x) or .htaccess (3.x) files.
  2. D5: Add $conf['clean_url'] = 1 to your settings.php – to manually enable clean urls.
  3. D6: There are no changes required – it simply works.

Resources:

IIS CleanURLs using some of the available ISAPI filters.

http://www.iis-aid.com/articles/how_to_guides/using_drupal_clean_urls_iis_and_isapi_rewrite_version_3

Using Clean URLs with IIS

0 comments

XHTML: You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>