[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[cobalt-users] Re: Using username.domainname.com



Once upon a time, Blacknight Solutions <info@xxxxxxxxxxxxxxxxxxxxxxxx> said:
> Maybe I'm completely off the mark, but that looks like you'd have to modify 
> a DNS setting as well.

Yes, you do.  Here is what I do (on "real" Apache on a "real" server,
not a RaQ):

In DNS:

*.home.hiwaay.net.	IN	CNAME	fly.hiwaay.net.

In httpd.conf:

<VirtualHost 208.147.154.56>
  ServerName nobody.home.hiwaay.net
  ServerAlias *.home.hiwaay.net
  RewriteEngine on
  RewriteCond %{HTTP:Host} nobody\.home\.hiwaay\.net [NC]
  RewriteRule /*(.*) http://home.hiwaay.net/$1 [R=301,L]
  RewriteCond %{HTTP:Host} (..*)\.home\.hiwaay\.net [NC]
  RewriteRule /*(.*) http://home.hiwaay.net/~%1/$1 [R=301,L]
  RewriteRule .* http://www.hiwaay.net/ [R=301,L]
</VirtualHost>

That allows my users to go to http://<user>.home.hiwaay.net/ and get
automatically redirected to http://home.hiwaay.net/~<user>/.

You can't really do this at the domain.com level because of the need for
a wildcard DNS entry.
-- 
Chris Adams <cmadams@xxxxxxxxxx>
Systems and Network Administrator - HiWAAY Internet Services
I don't speak for anybody but myself - that's enough trouble.