I have installed IIS rewrite module for IIS7 and although it's working I'm having a slight problem with the Regex.
It's just a very simple URL rewrite where I want to have
This works fine as it is, but I've found browsers (IE specifically) knock the last / off the URL in the autocomplete dropdown and my regex won't handle it.Code:/page/page2/id/ to go to pagepage2.aspx?ID=id
I currently have 3 rewrite rules, in order of
12Code:([_a-z0-9]+)/([_a-z0-9]+)/([_a-z0-9]+)[/]? goes to {R:1}{R:2}.aspx?ID={R:3}3Code:([_a-z0-9]+)/([_a-z0-9]+)[/]? goes to {R:1}{R:2}.aspxBut if I try loading page/1 it loads the first time, but when it does a partial postback on the page the rewrite ends up as pagepage1.aspxCode:([_a-z0-9]+)[/]? goes to {R:1}.aspx
I don't understand why it's doubling up the first variable. If I try page/1/ it works fine. It's just the last / I can't get to work right.
Hope that makes sense.
Any ideas?
<edit>Actually, it works on the first partial postback and then adds in the extra section to the rewrite on the second partial postback</edit>



LinkBack URL
About LinkBacks
Reply With Quote


Bookmarks