On 9/6/06, Norman Khine <[EMAIL PROTECTED]> wrote:
Thanks for your reply, I was looking at the
http://httpd.apache.org/docs/2.2/misc/rewriteguide.html documentation
and perhaps something like this may work...
RewriteEngine on
RewriteCond %{*HTTP_HOST*} *[^.]+*\.host\.com$
RewriteRule ^(.+) %{HTTP_HOST}$1 [C]
RewriteRule *([^.]+)*\.host\.com(.*) http://localhost:9080/*$1*$2 [P]
RequestHeader set X-Base-Path %{*HTTP_HOST*}
#Not sure if the logs entry is correct
ErrorLog /var/log/apache2/%{*HTTP_HOST*}-error_log
CustomLog /var/log/apache2/%{*HTTP_HOST*}-access_log common
The mod_rewrite stuff seems close, although there a bunch of random
"*"s thrown around that shouldn't be there. But you can't use
mod_rewrite variables (like %{HTTP_HOST}) in non-mod_rewrite
directives. For example, ErrorLog and CustomLog cannot use variables
like that, and I'm not sure if RequestHeader support env variables.
Joshua.
---------------------------------------------------------------------
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: [EMAIL PROTECTED]
" from the digest: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]