开发者

ASP.net redirect problem

This gives a 404 not found:

<rewrite url="~/forum/viewforum.php?f=([0-9]+)" to="~/Handlers/PermRedirect.ashx?ID=$1&amp;action=forumcat" process开发者_JAVA百科ing="stop"/>

But this works:

<rewrite url="~/forum/viewforum.php" to="~/Handlers/PermRedirect.ashx?ID=5&amp;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&amp;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

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜