Microsoft URL Rewrite Module 1.1 For IIS 7 To The Rescue

We are migrating the PontoNetPT community from an old .TEXT version to the latest Community Server (CS).

Because PontoNetPT has nearly 200 blogs with I don’t know how any posts, commentaries, trackbacks, etc., we are using the Community Server REST API.

The problem with using this API is that it doesn’t create the folder that CS can be configured to create with a default.aspx file for each blog created using it’s web site administration.

The importance of this folder and file is for IIS to be able to handle the requests http://<your community>/blogs/<your blog> or http://<your community>/blogs/<your blog>/ as if was a request to http://<your community>/blogs/<your blog>/default.aspx.

Fortunately, we are running on Windows 2008 and IIS 7 and all it took was to install the Microsoft URL Rewrite Module 1.1 For IIS 7 and configure it:

<configuration>
  <!--...-->
  <system.webServer>
    <!--...-->
    <rewrite>
      <rules>
        <rule name="Add Default.aspx to blog root URLs" stopProcessing="false">
          <match url="^blogs/([^/]*)(/?)$" />
          <action type="Rewrite" url="blogs/{R:1}/Default.aspx" />
        </rule>
      </rules>
    </rewrite>
    <!--...-->
  </system.webServer>
  <!--...-->
</configuration>

2 Responses to Microsoft URL Rewrite Module 1.1 For IIS 7 To The Rescue

  • Zulfikar says:

    You stated “all it took was to install the Microsoft URL Rewrite Module 1.1 For IIS 7 and configure it”

    For the life of me I can not figure out where and how to install the module.

    Some guidance or a pointer in the right direction will be very much appreciated.

  • paulo says:

    I just followed the instructions in the documentation (http://learn.iis.net/page.aspx/460/using-url-rewrite-module/) and the URL Rewrite Module showed up in IIS.

    Meanhile, there’s a bet of the version 2.0 that allows to also rewrite URLs in the output HTML.