I'm using IsapiRewriter on IIS6, but I think this question is more general than that. I'm also pretty sure there's no way to do it, but decided I should ask folks who know more regex than I do before giving up completely.
I'm matching url tails like the following:
which successfully matches
and when used in a pattern like
^/term1(\?)?(.*) /term1handler.aspx$1$2 [I]
quite properly redirects
However, some of my redirections need to redirect to something with a query string parameter already in the output. The existing redirect looks like
^/term1 /term1handler.aspx?ID=12345 [I]
I'd like to find a solution that allows me to replace $1 with an ampersand if there's a match there so that I end up with
Is there a regex pattern that can do this?