Hey all, I’ve got a question about
IIS7 rewrite.I’m wondering if there is a way to set
conditions for re writing urls. I’m
wanting to rewrite:to become
http://www.domain.com/username/
I also have
http://www.domain.com/article.aspx
http://www.domain.com/login.aspxand I want those to become
The issue I’m having is that if I set
up the rewrites for username the
rewrites for article and login break.I need to somehow exclude those from
the username rewriting so that they
can be handled on their own.Here is my current code, im rewriting
the usernames to /user/username at the
moment:<rewrite> <rules> <rule name="Rewrite user accounts2"> <match url="user/([_0-9a-z-]+)"/> <action type="Rewrite" url="user.aspx?id={R:1}"/> </rule> <rule name="Rewrite user accounts"> <match url="user/([_0-9a-z-]+)/"/> <action type="Rewrite" url="user.aspx?id={R:1}"/> </rule> </rules> </rewrite>
Hey all, I’ve got a question about IIS7 rewrite. I’m wondering if there is
Share
If you add the article/login rule at the top and add stopProcessing=”true” to it then you dont have to use conditions.
PS. the questionmark makes the preceding character optional.