httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Basil Mohamed Gohar <>
Subject Re: [users@httpd] Server-Variables in CondPattern of RewriteCond directive
Date Wed, 22 Apr 2009 14:14:09 GMT
On 04/22/2009 09:20 PM, Eric Covener wrote:
> On Wed, Apr 22, 2009 at 8:21 AM, Basil Mohamed Gohar
> <>  wrote:
>> Hello everyone!  What I am trying to do is use the server variable
>> %{SERVER_NAME} as the CondPattern argument to the RewriteCond directive.
>>   However, all of my attempts appear to render the string '%{SERVER_NAME}' as
>> a string literal, rather than replacing it with the variable name I expect
>> (i.e., the value for the ServerName of the VirtualHost).
>> Could someone please help me in trying to do this.  I would like to use the
>> server variable as it would save me a lot of time as I am configuring many
>> different VirtualHosts with similar, but not identical, setups, but this
>> aspect is consistent for many of them.
> Outside of htaccess, the pattern is compiled at startup, so you can't
> use variables (because they depend on parts of the request, even
> ServerName).
> IIUC It's feasible in per-directory, but not implemented.
So, what this means is it's not possible as it stands right now, correct?

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