httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Richard Lewis" <>
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?


# 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

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

  Richard Lewis

The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message