[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[cobalt-users] Multiple Domains with Single Virtual Host
- Subject: [cobalt-users] Multiple Domains with Single Virtual Host
- From: Reid Ivens <reid@xxxxxxxxxxxxxx>
- Date: Mon Jan 14 11:07:09 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
Hi folks,
I've setup a virtual site that I want two domains to point to by adding two
ServerAlias lines in the httpd.conf to point the second domain to the first.
When I go to the site using the second domain though, the URL changes to the
main domain name. Ideally, I'd like the URL to remain as entered. I assume
it's the webserver's Rewrite engine that is changing the URL, but I don't
know how to keep that from happening. Can anyone offer some help on this
issue?
Here is how my httpd.conf setup for the domains looks:
<VirtualHost 64.27.97.110>
ServerName www.domain1.com
ServerAdmin admin
DocumentRoot /home/sites/site35/web
ServerAlias domain1.com
ServerAlias domain2.com
ServerAlias www.domain2.com
RewriteEngine on
RewriteCond %{HTTP_HOST} !^64.27.97.110(:80)?$
RewriteCond %{HTTP_HOST} !^www.domain1.com(:80)?$
RewriteRule ^/(.*) http://www.domain1.com/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site35/users/$1/web/$3
AliasMatch ^/users/([^/]+)(/(.*))? /home/sites/site35/users/$1/web/$3
</VirtualHost>
Thanks,
Reid Ivens
-------------------------------------------------------------------
Reid Ivens, CIO mailto:reid@xxxxxxxxxxxxxx
N-VisionIT Interactive http://www.n-visionit.com
Tel: 613-282-8293 Fax: 425-963-2118