Re: Environment Variable with mod_rewrite

From: Date: Tue, 22 Oct 2002 01:27:53 +0000
Subject: Re: Environment Variable with mod_rewrite
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-120836@lists.php.net to get a copy of this message
Hi, Monday, October 21, 2002, 11:31:30 PM, you wrote: FW> Hi, FW> I just tried the following with php 4.1.2 as an Apache Modul. I added a FW> RewriteRule to my .htaccess file like this: FW> RewriteRule ^(.*)/SID([^/]+)/(.*) $1/$3 [E=SID:$2] FW> afterwards there should be an environment variable SID. But the Superglobal FW> $_ENV['SID'] do not exist. HTTP-Method is GET. FW> Does anyone have a suggestion how the environment variable could be accessed?` FW> Thanks in advance FW> Frank Wenzke I use this which is similar and works ok RewriteRule ^/sa/(.*)$ /sa/index.php [E=USERNAME:$1] But I have had troubles getting mod-rewrite to function with domains that are outside of the main apache document_root. For example I use mod_dynvhost and mod-rewrite totally ignores any rules set for those virtual domains. Maybe a clue.. -- regards, Tom

« previous php.general (#120836) next »