Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am used to working with Apache servers, so when mod_rewrite is enabled, I can create an htaccess file and use url rewriting.

Here's my htaccess file:

RewriteEngine On
RewriteCond %{REQUEST_FILENAME} -s [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^.*$ index.php [NC,L]

now I've built this site that uses this url rewriting module but I have come to learn that it is a microsoft server. Can I use my htaccess file? Is there something I need to change to get it to work? How can I tell if url rewriting is set up on the microsoft server?

Update: Is there a free version that I can install that works with htaccess files?

share|improve this question
up vote 0 down vote accepted

ISAPI-Rewrite 3 from HeliconTech has very Apache-like syntax. The above config will work in ISAPI_Rewrite3 .htaccess without any modifications.

share|improve this answer

You can import Apache mod_rewrite rules (not all of them, mind you) into the Microsoft URL rewriting engine for IIS7.

You can also install Ionics Isapi Rewrite Filter, an open-source mod_rewrite-alike for IIS 6 and 7. Another poster linked Helicon, which is similar, but costlier.

share|improve this answer

IIRC, IIS does not come with re-writing abilities out of the box. When we need to re-write, we use ISAPI Re-Write from HeliconTech. It's not free, but it is very cheap.

It will give you a file called httpd.ini - you put it in the root of your site like you would a .HTACCESS and it does the rest.

The format of the file is different, but it isn't that different.

share|improve this answer

THe isapi filters mentioned should work fine. You can also use or UrlRewriter.NET if you want to take the time to go .net. Both are free and will avoid the ISAPI filter hit. Your best option however is the IIS 7 URL rewrite module

share|improve this answer

Here's some information about IIS Mod-Rewrite from micronovae. I'm just starting to learn about it after discovering that CrystalTech uses it. It's a little more expensive than ISAPI_Rewrite.

share|improve this answer

IIRF (Ionic's ISAPI Rewrite Filter) will work with that .htaccess file, unchanged. Well, you have to rename it.

There are some features that Apache's mod-rewrite has that IIRF does not, but your .htaccess file will work with no changes.

share|improve this answer

Since I was running my WordPress blog ( on a cheap IIS host, I wasn't allowed to install an ISAPI filter.

I then came across Tom Bristol's great little ASP script to parse the .htaccess file to ensure that I had nice clean SEO links instead of querystrings.

Give it a go!

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.