Converting .htaccess rewrite rules to IIS

  1. Make sure the URL Rewrite module is installed and enabled for IIS. Right click on Sites, and make sure there is an icon with URL Rewrite label is listed in the IIS section.
  2. Install URL Rewrite module from IIS website if the module is not available.
    Download the module here : https://www.iis.net/downloads/microsoft/url-rewrite.
  3. After installing, close and reopen the IIS Manager. Refreshing the modules list will not work.
  4. Double click on the URL Rewrite module, and go to inbound rules > Import Rules.
  5. Copy and paste the rewrite rule from .htaccess to the Rewrite rules box. You will then get the converted rules in Tree View and XML view.
  6. Click on Apply to accept the converted rules and click on Back to Rules.

Thats it! 🙂