httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Manuel Silva" <>
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
To do that I am using RewriteRule and RequestHeader, this is what I am

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://
and converts it into htpp:// 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
+++ Empfehlung der Redaktion +++ Internet Professionell 10/04 +++

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message