-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi All,

 I'm configuring a Apache on my RHEL5 system and have been unable to
successfully set any environment variables using any of the documented
methods of doing so. I've tried the following different methods:

        SetEnvIfNoCase HTTP_HOST "(.*)" TEST=test
        SetEnvIf HTTP_HOST "(.*)" TEST=test

        SetEnv TEST test
        SetEnv TEST=test

        RewriteRule ^(.*)$ - [E=TEST:test]

 I have a simple PHP script dumping the $_ENV variable and a TEST
variable is never set.

 Can anyone help me out here? My end goal is to grab the subdomain
string and set an environment variable with it.

ie: you go to testsite.my.example.com
apache grabs the 'testsite' portion of the domain and sets: TEST=testsite


Here's what I put together so far:
.
# rewrites http://something.my.example.com/ to
http://my.example.com/clients/something/

RewriteCond %{HTTP_HOST} !^(www\.)?my\.example\.com$    [NC]
RewriteCond %{HTTP_HOST} ^(.+)\.my\.example\.com$ [NC]
RewriteRule !^clients/(.*)$ clients/%1%{REQUEST_URI} [QSA,E=TEST:%1,L]


The person is directed to the correct directory (clients/testsite/ for
example) but the environment variable is never set.

Any help greatly appreciated.
- -Nick





- --
Nick Jennings
Technical Director
Creative Motion Design
www.creativemotiondesign.com
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.9 (GNU/Linux)
Comment: Using GnuPG with SUSE - http://enigmail.mozdev.org

iEYEARECAAYFAkoNif8ACgkQbqosUH1Nr8epnwCgyjGVMYmSDWi+w743/uONlVjE
zj0AoI8t6IhszGJkzbZTn/Fr/BA4hE5k
=fkvL
-----END PGP SIGNATURE-----

_______________________________________________
rhelv5-list mailing list
[email protected]
https://www.redhat.com/mailman/listinfo/rhelv5-list

Reply via email to