get rewritten url from codebehind

xBloodshed

New Member
We're using IIS 7 "URL Rewrite" feature for some of our urlsfor example a rule that rewrites\[code\]/viewSompage.aspx?id=123&title=some-title \[/code\]rewrites to\[code\]/View/SomePage/some-title/123/\[/code\]For several purposes (one of them being able to set the rewritten url in an e-mail template etc) we need to get the rewritten url in codebehind, given the string.I know the rewritter automatically applies those in pages using the outbound rules, but i still need to get the rewritten url for other purposes.i'd like to be able to pass a url string, and make the urlrewiter apply any applicable rules to the given url example\[code\]String rewrittenURL = ApplyRewritingRules("/viewSompage.aspx?id=123&title=some-title");\[/code\]thanks in advance
 
Back
Top