hits counter

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>

No Comments