I have a webforms website I'm translating to MVC but I want certain url's that have been indexed to find their new url in the mvc site and I'm struggling with the one below:
http://www.domain.com/content/reviews/I_once_answered_a_question_in_SO_page512.aspx
And I want to translate it to a format like:
http://www.domain.com/view/512/I_once_answered_a_question_in_SO
So far the best I have:
<rule name="content pages" stopProcessing="true">
<match url="^.*(?:content/(.*)_page([0-9]+)\.aspx)$" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="true">
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
</conditions>
<action type="Redirect" url="/view/{R:2}/{R:1}"/>
</rule>
I think it's quite close but I can't see why it doesn't match.