ASP.net redirect problem
This gives a 404 not found:
<rewrite url="~/forum/viewforum.php?f=([0-9]+)" to="~/Handlers/PermRedirect.ashx?ID=$1&action=forumcat" process开发者_JAVA百科ing="stop"/>
But this works:
<rewrite url="~/forum/viewforum.php" to="~/Handlers/PermRedirect.ashx?ID=5&action=forumcat" processing="stop"/>
Am I handling this wrong? I'm just trying to pass the querystring data from the original url to the redirect script.
seems that you forgot the "\" escape character for "?". Give a try this.
<rewrite url="~/forum/viewforum.php\?f=([0-9]+)" to="~/Handlers/PermRedirect.ashx?ID=$1&action=forumcat" processing="stop"/>
Maybe something here will help:
http://weblogs.asp.net/scottgu/archive/2007/02/26/tip-trick-url-rewriting-with-asp-net.aspx
精彩评论