Nick, I believe the syntax is RewriteEngine on; RewriteRule <base url>/A/.* - [E=Config:A] RewriteRule <base url>/B/.* - [E=Config:B] _________________________________________________ my actual setup Alias /bugzillatest /usr/share/bugzilla Alias /bugzillaother /usr/share/bugzilla <Directory /usr/share/bugzilla> RewriteEngine on #RewriteRule .*bugzillaother.* -E=BugzillaDataRoot:/home/Bugzilla/data RewriteRule .*o.* - [E=BugzillaDataRoot:/home/Bugzilla/data] SetEnv webservergroup apache AddHandler cgi-script .cgi Options +Indexes +ExecCGI +FollowSymLinks DirectoryIndex index.cgi AllowOverride Limit Options FileInfo </Directory> _______________________________________________ However what I am trying is not working the pattern .*other.* should match bugzillaother but it doesn't. The pattern .*bug.* matches and .*o.*, .*bugzilla.*, .*bugzill.* and .*bugz.* do not. It appears to me that the matching is being done against a different string to what I am expecting or the pattern matching is not working properly. Could you please explain what is going on? Cheers Stephen -----Original Message----- From: Stephen Brennan Sent: Tuesday, 4 November 2008 7:30 AM To: users@xxxxxxxxxxxxxxxx Subject: RE: Apache - URL based environment variables Nick, Thank you. Is this the best way to achieve this? Ie. I am sure that I have managed to do this before with Location directives. Has this changed? Would this be the correct syntax for my example? RewriteEngine on; RewriteRule <base url>/A/.* - E=Config:A RewriteRule <base url>/B/.* - E=Config:B Cheers Stephen -----Original Message----- From: Nick Kew [mailto:nick@xxxxxxxxxxxx] Sent: Monday, 3 November 2008 8:25 PM To: users@xxxxxxxxxxxxxxxx Subject: Re: Apache - URL based environment variables On Mon, 3 Nov 2008 13:04:32 +1000 "Stephen Brennan" <Stephen.Brennan@xxxxxxxxxxxxx> wrote: > Hi all, > > I am trying to figure out how to configure appache webserver to set > different UNIX environment variables depending on the url text > entered. RewriteRule. Capture the path component you want, and use it with the E flag and the - target. -- Nick Kew Application Development with Apache - the Apache Modules Book http://www.apachetutor.org/ --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx --------------------------------------------------------------------- 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@xxxxxxxxxxxxxxxx " from the digest: users-digest-unsubscribe@xxxxxxxxxxxxxxxx For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx