<rewrite url="~/forum/viewtopic.php\?t=([0-9]+)" to="~/Handlers/PermRedirect.ashx?ID=$1&a开发者_JS百科ction=forumpost" processing="stop"/>
This works great, but how to I make it redirect if t=([0-9]+)
exists anywhere in the querystring?
Example URL's that it should match:
/forum/viewtopic.php?t=123&f=rgrg&rt=224
/forum/viewtopic.php?ty=345345&t=123&f=rgrg&rt=224
/forum/viewtopic.php?f=rgrg&rt=224&t=45
Can I make one rule to match them all? One ring, to rule them all.
Does this do the trick in your case?
url="~/forum/viewtopic.php\?.*t=([0-9]+).*
精彩评论