[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: [cobalt-users] not using "www"
- Subject: RE: [cobalt-users] not using "www"
- From: "hexy" <hexy@xxxxxxxxxxxxxx>
- Date: Thu Mar 21 16:27:28 2002
- List-id: Mailing list for users to share thoughts on Cobalt products. <cobalt-users.list.cobalt.com>
What about some wildcards? something like this:
--snip--
RewriteEngine on
RewriteCond %{HTTP_HOST} !^000.000.000.000(:80)?$
RewriteCond %{HTTP_HOST} !^www.yourdomain.com(:80)?$
RewriteCond %{HTTP_HOST} !^(.*)yourdomain.com(:80)?$
RewriteRule ^/(.*) http://www.yourdomain.com/$1 [L,R]
RewriteOptions inherit
--snap--
I don;t know what effect that would have on name based virtual hosts tho, probably have to specify each severalias that you want...
Rgds
Dave Transom
-----Original Message-----
From: "Kai" <go@xxxxxxxxxxxx>
To: <cobalt-users@xxxxxxxxxxxxxxx>
Subject: RE: [cobalt-users] not using "www"
Date: Thu, 21 Mar 2002 20:24:52 +1000
Reply-To: cobalt-users@xxxxxxxxxxxxxxx
Yep sure is.
[root@yourbox]# pico /etc/httpd/conf/httpd.conf
save it as httpd.conf.backup<date> ( the way i do it ) just in case
scroll down to the virtual site you want.
IE:
<VirtualHost 000.000.000.000>
ServerName www.yourdomain.com
ServerAdmin admin
DocumentRoot /home/sites/siteXX/web
ServerAlias yourdomain.com
RewriteEngine on
RewriteCond %{HTTP_HOST} !^000.000.000.000(:80)?$
RewriteCond %{HTTP_HOST} !^www.yourdomain.com(:80)?$
RewriteRule ^/(.*) http://www.yourdomain.com/$1 [L,R]
RewriteOptions inherit
AliasMatch ^/~([^/]+)(/(.*))? /home/sites/siteXX/users/$1/web/$3
AddHandler cgi-wrapper .cgi
AddHandler cgi-wrapper .pl
AddHandler server-parsed .shtml
AddType text/html .shtml
AddType application/x-httpd-php .php4
AddType application/x-httpd-php .php
# AddHandler chiliasp .asp
# AddHandler chiliasp .asa
</VirtualHost>
OK see this bit:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^000.000.000.000(:80)?$
RewriteCond %{HTTP_HOST} !^www.yourdomain.com(:80)?$
RewriteRule ^/(.*) http://www.yourdomain.com/$1 [L,R]
RewriteOptions inherit
Change this line:
RewriteCond %{HTTP_HOST} !^www.yourdomain.com(:80)?$
To:
RewriteCond %{HTTP_HOST} ^www.yourdomain.com(:80)?$
Save it. And restart httpd by typing: /etc/rc.d/init.d/./httpd restart
This worked for me. RaQ4. Might be different for you.
Kai.
-----Original Message-----
From: cobalt-users-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Benedict
Sent: Thursday, 21 March 2002 4:55 AM
To: cobalt-users@xxxxxxxxxxxxxxx
Subject: [cobalt-users] not using "www"
Hi
I've been discussing the use of "www" in front of some
of the domain-names I maintain. Is there a way
to make Cobalt machines (RaQ 4 and Qube 3 in my case)
*not* jump to setting a hostname in front of the domain?
So that if I use
http://domain.org
that it doesn't change into
http://www.domain.org
all the time?
I'm not convinced the hosts are of use in my setups,
and I want my domains to enjoy their short names,
without the "www" in front of it.
In a BSD environment which I also maintain, the host
can be anything I want, or nothing at all, and the
DNS-records have no problem dealing with this.
http://domain.org does not need a host in front of it,
http://*.domain.org all goes to the same A-record.
Any tips on this highly appreciated,
------------------------------------------------
This mail sent from DHBiT - http://mail.dhbit.ca
Come get your free, secure 5MB mailbox today!