HOW TO: configure IIRF on IIS6 for Drupal and WordPress – Clean URLS

Clean URLSThis is a complete walk-through to get Ionic Shades IIRF clean and friendly URL rewriter up and running in just a few minutes. This is specifically written for Windows 2003 Server/IIS 6 and it has a complete and working example of the code you need to use for your IsapiRewrite4.ini file. If you just need the IsapiRewrite4.ini code you can skip to the end and just copy and paste, but this post might make a useful check list.

This configuration will allow you to host multiple websites on IIS6, whether the solution is for Drupal or WordPress – I’m hosting several sites on a Windows 2003 server and IIRF is works and completely free!
  1. Create a directory on your server – SERVER\c$\Inetpub\wwwroot and arbitrarily name it ‘ISAPI
  2. Right click on the newly created ISAPI folder and select Properties > Security tab > Add
    1. Now click on the Advanced button
    2. You’ll now see the Advanced dialogue box. Select Object Types
    3. Click the box that says Computers
    4. And then click OK
    5. Next click on the Find Now button, scroll down the list until you find IIS_WPG and IUSR_YourComputerName
    6. Now click OK. and then OK again to add those names you have just selected
    7. And now select the user Internet Guest Account – IUSR_YourComputerName and give it the following permissions: Modify, Read & Execute, List Folder Contents, Read, Write
    8. Click OK
If you want to use IIRF with multiple websites, just create a folder inside your ISAPI folder and call it yourdomainname and place the files IsapiRewrite4.dll and IsapiRewrite4.ini in there. Once you’ve created the new directory, open the IsapiRewrite4.ini file and paste the following code in there:
RewriteCond %{HTTP_HOST} ^(www\.yourdomainname\.com).*$ [I]
RedirectRule ^/(.*)$$1 [I,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(?!favicon.ico$)([^?]*)(?:\?(.*))?$ /index.php?q=$1&$2 [L]

RewriteCond %{HTTP_HOST} ^(yourdomainname\.com).*$ [I]
RedirectRule ^/(.*)$$1 [I,R=301]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^/(.*)$ /index.php/$1 [L]

Just make sure you have your IsapiRewrite4.dll and IsapiRewrite4.ini in the same folder. You won’t have any trouble at all; this code will work. If there’s any chance you have a problem, re-boot your server.
Now onto configuring IIS
  1. Open your Internet Information Services (IIS) console.
  2. Open your websites folder and select website
  3. Right click on your website and select Properties
  4. Now go to the ISAPI Filters tab and click the Add button.
  5. Under Filter name: put some text in (this text is arbitrary, but it’s useful to put something appropriate in such as Ionic Shade’s IIRF).
  6. Then click on the Browse button and locate the file IsapiRewrite4.dll which is in your newly created ISAPI folder and click OK.
That’s it! You’re all setup for Clean URLs!

18 thoughts on “HOW TO: configure IIRF on IIS6 for Drupal and WordPress – Clean URLS

  1. I like your transitions and quality. I have been writing for Ghost Writers for a while now, and they pay me well to write blog posts like this, or articles. I clear $100-$200 on a awful evening.
    Judging by your ability with the written word, you may enjoy doing the same.
    It wouldnt hurt to check them out.Here are the details

  2. After study a few of the blog posts on your website now, and that i truly as if your way of blogging. I bookmarked it to my bookmark website list and will also be checking back soon. Pls check out my web site as well and tell me what you think.

  3. Where might I find the identical wordpress theme like this one? is it compatible with the present-day 3.1? ta

  4. Like a Newbie, I’m always searching on the internet for articles that will help me. Congratulations for posting this type of useful weblog. Your site isnt only informative and also very artistic too. There normally are extremely handful of individuals who can write not so simple articles that creatively. Keep up the great work !!

  5. Someone I work with visits your blog regularly and recommended it to me to read too. The way of writing is great and also the content is top-notch. Thanks for the insight you supply the readers!

  6. continue with the the nice work on the site. I like it. Could maybe use some more updates more often, but i am sure that you got other things things to do like we all do. :p

  7. i have visited this cool site a few times now and i have to tell you that i find it quite good actually. continue doing what you’re doing! =p

  8. Nice blog here! Also your website loads up very fast! What web host are you using? Can I get your affiliate link to your host? I wish my website loaded up as fast as yours lol

  9. continue with the the nice work on the blog. I like it. Could use some more frequent updates, but i am quite sure you have got other things stuff to do like we all have to do unfortunately. =p

  10. Hi there may I use some of the information here in this post if I provide a link back to your site?

  11. I really enjoyed your internet site. Its nice when you read something that isn’t just informative but entertaining. Greet!

Comments are closed.