Forum Moderators: phranque

Message Too Old, No Replies

Using request vars in httpd.conf

         

hmmmm

6:25 pm on Jun 10, 2006 (gmt 0)



hi,

i'm trying to find info that will help me to achieve the following...

within a <VirtualHost..> within the httpd.conf (not a htaccess rewrite) i want to use an Alias/ScriptAlias like this...

Alias /image "/home/sites/<$requested_domain>/images

can anyone help... i'm sure this is simple but i just can't seem to work out how to get the <requested_domain>?

thanks... :-)

jdMorgan

11:07 pm on Jun 10, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The variable is %{HTTP_HOST}, but there's not a lot of variable support at this level. There is no mention of using variables in the Alias [httpd.apache.org] directives, and you may need to use a server-side script to 'regenerate' your httpd.conf to add or modify aliases.

(Remember that httpd.conf is compiled at server restart, and is not interpreted or processed dynamically.)

Jim