Multiple values RewriteMap prg

妖精的绣舞 提交于 2019-12-13 06:16:01

问题


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!


回答1:


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.



来源:https://stackoverflow.com/questions/50883456/multiple-values-rewritemap-prg

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!