Hi,
Im using the IIS 7 Rewrite module to rewrite pages/directories. All is working fine apart from the home page. My syntax is as so:
<rewrite>
<rules>
<rule name="Add trailing slash" stopProcessing="false">
<match url="(.*[^/])$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
</conditions>
<action type="Redirect" redirectType="Permanent" url="{R:1}/" />
</rule>
<rule name="Rewrite home page">
<match url="/" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/lib/pages/default.aspx" />
</rule>
<rule name="Rewrite about page">
<match url="^about" ignoreCase="true" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="/lib/pages/default.aspx" />
</rule>
</rules>
</rewrite>
When i navigate to my home page, the InputUrl is blank, therefore it wont match the single slash i have provided, but also i cant provide url="".
Regular expressions arent my thing, so if anyone knows the right syntax it would be much appreciated.
Thanks in advance.
Al