Urlrewriting.NET help required

Izi

Izi

Soldato
Joined
9 Dec 2007
Posts
2,718
Really struggling with some rules I need to write.

Bascially I want /news/ to go to one page and /news/a-news-story to go to another.

<add name="News" virtualUrl="^/news/"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/News.aspx?s=/news/"
ignoreCase="true" />


<add name="NewsArticle" virtualUrl="^/news/([0-9]+)/([0-9]+)/([0-9]+)/(.+)/([0-9]+)"
rewriteUrlParameter="ExcludeFromClientQueryString"
destinationUrl="~/ArticleView.aspx?s=/news/article/&amp;ArticleID=$5"
ignoreCase="true" />


these rules work independently but when they are both in they stop working. How to I fix this?
 
<add name="NewsArticle" virtualUrl="^/news/([0-9]+)/([0-9]+)/([0-9]+)/(.+)/([0-9]+)"

taking the brackets out of that broke it..

moving the order which they were in fixed the issue though.

what does the $ sign mean?
 
Back
Top Bottom