httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Stephen Brennan" <Stephen.Bren...@elprotech.com>
Subject RE: [users@httpd] Apache - URL based environment variables
Date Mon, 03 Nov 2008 22:51:41 GMT
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@httpd.apache.org
Subject: RE: [users@httpd] 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@webthing.com]
Sent: Monday, 3 November 2008 8:25 PM
To: users@httpd.apache.org
Subject: Re: [users@httpd] Apache - URL based environment variables

On Mon, 3 Nov 2008 13:04:32 +1000
"Stephen Brennan" <Stephen.Brennan@elprotech.com> 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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.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@httpd.apache.org
   "   from the digest: users-digest-unsubscribe@httpd.apache.org
For additional commands, e-mail: users-help@httpd.apache.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@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