Simon Baynes: Web Development

Moving from Apache to IIS

My most recent project has been moving all our production websites to IIS from Apache. This mainly quite low level and not at all complicated. The real challenge comes because we are heavy users of mod_rewite.

Fortunately Helicon have a product called ISAPI rewrite 3 which has very similar syntax to modrewrite. There are a few gotchas to bear in mind. The one that I spent too long solving was that the URL that you are assessing with RewriteRule in ISAPI rewrite starts with a / which is not the case in modrewrite. However, I was very thankful to discover that I did not need to change all my rules, I just had to add RewriteBase / just after the RewriteEngine on directive.

The other huge one for me was that environment variables were not supported in ISAPI Rewrite. This did cause me to have to rearchitect thew rewrites I had for my search. However the upside of this was that I got a lot better at rewrites and realised that my initial implementaion was over complicated.

By Simon Baynes