httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rob Wilkerson <r.d.wilker...@gmail.com>
Subject Re: [users@httpd] Modifying environment variables passed to CGI's.
Date Tue, 03 Oct 2006 23:19:55 GMT

On Oct 3, 2006, at 7:08 PM, Jason Lingel wrote:

> Is there a way to modify an environment variable that gets passed  
> to a CGI?  For example, I'm doing Kerberos authentication and the  
> realm gets appended to the REMOTE_USER variable, e.g., REMOTE_USER=  
> username@MYCOMPANY.COM.  I just want username and not the realm.  I  
> would prefer not to do this in the CGI because the CGIs are already  
> written (legacy in house application).
>
> TIA.
>
I just did this using mod_rewrite by setting the E flag.

RewriteRule /.* - [E=varname:value]

In my case, I needed to pass the request uri to ColdFusion (which  
doesn't appear to pass it along as it should).  I did so using this  
capability (I was already using mod_rewrite).

RewriteRule /.* /my/redirect.cfm [E=MY_REQUEST_URI:%{REQUEST_URI},PT]

Worked like a charm.

Hope this helps.

---------------------------------------------------------------------
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