Regular expressions in URL Rewrite Module for IIS7
Posted
by TN
on Stack Overflow
See other posts from Stack Overflow
or by TN
Published on 2010-03-16T17:32:27Z
Indexed on
2010/03/18
5:51 UTC
Read the original article
Hit count: 531
I have following rewrite rule to append .aspx
extension if url has no extension.
<rule name="SimpleRewrite" stopProcessing="true">
<match url="^(.*(?<=/)([^/.]*))$" />
<action type="Rewrite" url="{R:1}.aspx" />
</rule>
However the rule is not working:
Error HTTP 500.52 - URL Rewrite Module Error.
The expression "^(.*(?<=/)([^/.]*))$" has an invalid syntax.
However, this regular expression works in .NET. What regular expressions are supported by IIS Url Rewrite Module? How to make positive lookbehind assertion?
© Stack Overflow or respective owner