httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Silva" <Manuel.Si...@gmx.net>
Subject [users@httpd] RewriteRule and Environment variables
Date Fri, 08 Oct 2004 12:14:18 GMT
I would like to extract a part from a URL and then set a request header with
it. 
To do that I am using RewriteRule and RequestHeader, this is what I am
doing:

RewriteEngine on
RewriteLog "rewrite.log"
RewriteLogLevel 5
RewriteRule ^/j_username/([^/]+)/(.*) /$2 [R,L,E=%{foo}:$1]
RequestHeader set j_username %{foo}e

This expects something like htpp://www.abc.com/j_username/aUser/app/test.jsp
and converts it into htpp://www.abc.com/app/test.jsp and 
sets the environment variable foo to 'aUser'. 

*THE PROBLEM* is that the environment variable foo gets set in the
RewriteRule (checked on the rewrite.log file) but
it is null in the RequestHeader line. How can I pass foo's value from the
RewriteRule line to the RequestHeader line?

kind regards,

Manuel Silva

-- 
GMX ProMail mit bestem Virenschutz http://www.gmx.net/de/go/mail
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++


---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscribe@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.org


Mime
View raw message