Simple Rewrite Question

Sep 23, 2010 at 11:21 PM

I'm new to all this, but I think this tool might do what I need it to.  Here's my scenario:

I need the URLs on the left to rewrite to the URLs on the right.  I have 200 of these and they don't follow any rhyme or reason.

Can I accomplish this?  All the examples I saw were for reg ex stuff that was expecting some sort of pattern.  An example for the below rewrite would be appreciated.

/ProfessionalServices /Content/base.asp?pid=59.411


/BettorChance /GamingGroup/Games/base.asp?pid=5.341
/BettorChance/ /GamingGroup/Games/base.asp?pid=5.341
/UsersConference/ /Content/base.asp?pid=59.421



Oct 1, 2010 at 1:40 AM
Nate, check out the documentation on the RewriteMap directive. It's designed to cover the scenario you describe. Even if you don't use RewriteMap, you can still do what you want. You'd need to specify 200 distinct RewriteRule directives (or RedirectRule directives, etc). Instead of a "pattern", you would specify the exact incoming querystring for each of your 200 cases. You will need to "escape" any characters in the incoming querystring that are significant in the regex language, like . (dot) for instance. That's why it's easier to use the RewriteMap directive. Good luck.