Rewrite Map with Multiple Values

Topics: Developer Forum
Apr 13, 2010 at 4:47 PM

I may be missing something, but can a Rewrite Map have more than one value associated with the incoming request?


Claw-Hammer 17282,1,3

Shelf-Bracket 87112,7,3

Adjustable-Wrench 35367,4,3


so that actually points to


How would you set up the map to do this?

Apr 13, 2010 at 9:57 PM

I think I might use three distinct maps for that.

or, specify the URL, and not the three distinct params.

# map part names to url fragments
claw-hammer          id=17282&sid=1&rid=3
shelf-bracket        id=87112&sid=7&rid=3
adjustable-wrench    id=35367&sid=4&rid=3

And then the rule is like this:

  RewriteMap  partname        txt:partnames-to-url-fragments.txt
  RewriteRule ^/Product/(.+)$       /products/default.asp?${partname:$1}  [L]



Apr 14, 2010 at 2:04 PM

Such a simple answer, guess  I was over thinking it. Thank you very much!