asp.net - Why URLRewriter.NET doesn't get querystring values? -


I have just started using URLRewriter.net with my blog and I have problems finding query string values is. I have a rule like this:

  & lt; Url = "~ / blog.aspx (\?. +)? $" To = "~ / hidden Folder / blog.aspx? Mode = default & amp; $ 2" />  

But when I try to use /blog.aspx?page=1 the page parameter is not passed. Other parameters have done great work and there is no conflict in writing the rules again.

I think the problem is that as far as the $ 2 limit you have only your RegEx Have a group in $ 1 Try it

Edit

In addition to this, it may be that the query string is replaced with the other '?' So you need to go out of that bracket.

You will need an additional group to match the rule without our 'rule'. Note: We are now returning to $ 2 as a result :)

  & lt; Url = "~ / blog.aspx (\? (. +)?)? $" To = "? ~ / HiddenFolder / blog.aspx mode = default & amp; $ 2" />  

Comments

Popular posts from this blog

paypal - How to know the URL referrer in PHP? -

oauth - Facebook OAuth2 Logout does not remove fb_ cookie -

wpf - Line breaks and indenting for the XAML of a saved FlowDocument? -