IIS on Windows Server 2008 R2.
I have the following (which was generated by URL rewrite 2.0):
<rule name="RewriteUserFriendlyURL1" stopProcessing="true">
<match url="^/([^/]+)/?$" />
<conditions>
<add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
<add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
</conditions>
<action type="Rewrite" url="?p={R:1}" appendQueryString="true" logRewrittenUrl="true" />
I thought it would cause
to be interperated as:
Can anyone see what it wrong? It just gives a 404 error.
I have also tried a url redirect rule and that works fine so I know the module is working.
Your solution is correct but the regular expression to which you match the URL should not start with a slash. The following works:
Hope this helps.