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

RE: [cobalt-users] not using "www"



doh. totally wrong.

ADD this line:
RewriteCond %{HTTP_HOST}                !^yourdomain.com(:80)?$

Leave the other one's in tact.

Thanks.
Kai
-----Original Message-----
From: cobalt-users-admin@xxxxxxxxxxxxxxx
[mailto:cobalt-users-admin@xxxxxxxxxxxxxxx]On Behalf Of Kai
Sent: Thursday, 21 March 2002 8:25 PM
To: cobalt-users@xxxxxxxxxxxxxxx
Subject: RE: [cobalt-users] not using "www"


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!

_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users


_______________________________________________
cobalt-users mailing list
cobalt-users@xxxxxxxxxxxxxxx
To Subscribe or Unsubscribe, please go to:
http://list.cobalt.com/mailman/listinfo/cobalt-users