urlrewriter.net

Why URLRewriter.NET doesn't get querystring values?

江枫思渺然 提交于 2019-12-25 12:19:28
问题 I just started using URLRewriter.net with my blog and I have a problem with getting the query string values. I have a rule setting like: <rewrite url="~/blog.aspx(\?.+)?$" to="~/hiddenFolder/blog.aspx?mode=default&$2"/> But when I try to access /blog.aspx?page=1 the page parameter is not passed. Other parameters work great and there are no conflicts in rewriting rules. 回答1: I think the problem is that $2 is out of range as you only have one group in your RegEx. Try $1. EDIT In addition, it

Using external config file for UrlRewriter.NET

别等时光非礼了梦想. 提交于 2019-12-24 01:47:25
问题 I'm using the UrlRewriter.NET library to implement url rewriting for my asp.net website. The rewriting rules are currently being read from the web.config file like this <rewriter> <rewrite url="/test-web-page" to="~/realwebpage.aspx"/> </rewriter> How do I make the library read my rewriting rules from another file rather than the web.config ? 回答1: Yes you can - it is mentioned here on this page http://urlrewriter.net/ interesting looking at their examples the do not specify exactly hw to do