httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Lewis" <richardle...@fastmail.co.uk>
Subject [users@httpd] AliasMatch with env variable
Date Thu, 18 Nov 2004 11:49:38 GMT
Hi there,

Does Apache (1.3) allow me to use arbitrary environment variables in
arbitrary places?

e.g.

# set 'site_version' to the base directory for the user's browser
SetEnv site_version /var/www/default
BrowserMatchNoCase msie site_version=/var/www/explorer
# etc...

# and later on direct requests for CSS stylesheets
# to the correct location using 'site_version'
AliasMatch "^.*/([^/]*).css" $site_version/$1.css

So, when an HTML page includes:
<link rel="stylesheet" type="text/css" href="style.css" />

an error message in /var/log/apache/error.log appears like this:
[date] [error] [client ] File does not exist: $site_version/style.css

its not translating '$site_version' in AliasMatch to the value of the
variable.

Is it supposed to? And, if not, how can achieve this?

Cheers,
Richard
-- 
  Richard Lewis
  richardlewis@fastmail.co.uk


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