pythonapachehttpmod-rewriterewritemap

Multiple values RewriteMap prg


I'm not able to pass multiple values through a RewriteMap prg. This is what I have:

RewriteMap encrypt "prg:/bin/python2.7 /var/www/encrypt.py"
RewriteRule /secure ${encrypt:%{LA-U:ENV:email}} [P]

I am able to pass just one variable from the header, but not more than two.Any help would be appreciated it.

Thank you!


Solution

  • RewriteMap only takes one key string as a parameter, but you can append multiple things to the key. This is what I ended up with:

    RewriteRule /secure http://website.com/${encrypt:%{LA-U:ENV:uid};%{LA-U:ENV:givenname};%{LA-U:ENV:surname};%{LA-U:ENV:email}}
    

    The semicolon act as a separator to be used later to split the string.