How to convert .htaccess to IIS?

Hello,

I’m transferring my website from Linux to Windows Server 2008 and I’d like to use IIS.

The problem is I have pretty complicated .htaccess file with complicated URL rewrite rules and redirections in it.

I wonder is there any tool for conversation or maybe there is some easy tutorial?

Thanks in advance.

al,

{moved as this is NOT an Apache question}

It was either wwb_99 or Karl (both experts with M$ servers) that informed us about a month or two ago that M$ had tried to replicate mod_rewrite for IIS. Therefore, everything should work the same but …

Regards,

DK

There are a few options out there:

  1. IIS7 has native url-rewriting support, though I think there are some syntax differences between the mod_rewrite and IIS native syntax.

  2. There are some products for IIS5 and 6 (and 7) that work as ISAPI modules and recreate the effects of mod-rewrite. One of them is actually written to take apache mod_rewrite commands. ISAPI rewrite was one of the components, can’t remember the other off the top of my head.

Thanks for answers guys.

  1. IIS7 has native url-rewriting support, though I think there are some syntax differences between the mod_rewrite and IIS native syntax.

I wonder is there any tutorial on how to convert mod_rewrite rules to IIS7? Also, what is the name of that native url-rewriting feature?

  1. There are some products for IIS5 and 6 (and 7) that work as ISAPI modules and recreate the effects of mod-rewrite. One of them is actually written to take apache mod_rewrite commands. ISAPI rewrite was one of the components, can’t remember the other off the top of my head.

I found that thing, mod_rewrite for IIS7 costs $200. It’s pretty expensive.

Is there any free copy of mod_rewrite module for IIS?

I think the built-in one is the URL Rewrite Module. Big difference isn’t in the expressions, it is the way the rules are declared. IIS7 config is XML, not some wiered INI format. For information on this module, I would look at IIS.net and Scott Guthrie’s blog.

I think this ISAPI filter (which should work in IIS7) uses apache syntax and is free: http://cheeso.members.winisp.net/IIRF.aspx. Wikipedia has a decent list of additional options.

Tada! http://www.iis.net/extensions/URLRewrite
And: Importing Apache mod_rewrite Rules

Easy as pie with IIS 7 <3