What I want to achieve is hitting a URL, say http://myhost/eng/LOGIN/login?BID=12&BFORENAME=C&BSURNAME=C
and have those parameters inserted as headers on the request. The parameters are fixed names so I can assume there should always be those 3.
The way I went about doing it was using RewriteRule in httpd.conf to set an environment variable and then RequestHeader to set the header based on the environment variable.
First, can anyone suggest the rules to use, at the moment I'm looking like
RewriteEngine on
RewriteCond %{QUERY_STRING} BID=(.*)&BFORENAME=(.*)&BSURNAME=(.*)
RewriteRule ^(.*) $1? [R,E=VBID:%1,E=VF:%2,E=VS:%3]
RequestHeader set BID "%{VBID}e"
RequestHeader set BF "%{VF}e"
RequestHeader set BS "%{VS}e"
But I keep getting a null header (or no header if I use env=varname).
Can anyone suggest what I am doing wrong and why I can't seem to pass a value from the rewriterule to the headers using environment variables?