sollie
08-28-2002, 02:45 PM
I own a cobalt raq4r
If i add a alias it is rewritten by the main domain of the site:
e.g.
main domain: www.domain.com
alias: www.mydomain.net
If i ask www.mydomain.net it is rewritten by www.domain.com
Is there a (easy) way to prevent the cobalt from doing this?
Mybe with .htaccess?
eddy2099
08-28-2002, 04:12 PM
Well, for me what I did was go to httpd.conf and make the following modification :-
<VirtualHost xx.xx.xx.xx>
ServerName www.domain.com
ServerAdmin site1
DocumentRoot /home/sites/site1/web
ServerAlias domain.com
< Blah Blah Blah>
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site1/users/$1/web/$3
<VirtualHost xx.xx.xx.xx>
ServerName www.domain.net
ServerAdmin site1
DocumentRoot /home/sites/site1/web
ServerAlias domain.net
< Blah Blah Blah>
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/site1/users/$1/web/$3
Basically just point the DocumentRoot and Alias Match to the same place and that should work.
So anything typing http://www.domain.com will get to http://www.domain.com and those to http://www.domain.net would get to http://www.domain.net . But the pages are aliases.
However, the stats would be screwed up because both would show the same consumption of bandwidth.
Hope that helps.
blacknight
08-28-2002, 04:37 PM
Maybe if you turn the rewrite off???