[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [cobalt-users] maybe somebody knows how to enable the wildcards on the raq3
- Subject: Re: [cobalt-users] maybe somebody knows how to enable the wildcards on the raq3
- From: Jeff Lasman <jblists@xxxxxxxxxxxxx>
- Date: Tue May 23 00:07:49 2000
- Organization: nobaloney.net
webmaster@xxxxxxxxxxx wrote:
> hi, everybody, maybe you have already seen, that if you
> type yourdomain.com, and this domain name will be
> changed to www.yourdomain.com...
> if you make the dns that yourdomain.com points to one ip,
> and www.yourdomain.com poits to another ip.
> that will be very funny...you type yourdomain.com and
> link to the another ip...
>
> maybe somebody knows hot to prevent it.
Here's how I prevent it:
I find these lines in the relevent virtual host section of
/etc/httpd/conf/httpd.conf:
RewriteEngine on
RewriteCond %{HTTP_HOST} !^222.111.111.222(:80)?$
RewriteCond %{HTTP_HOST} !^www.domain.com(:80)?$
RewriteRule ^/(.*) http://www.domain.com/$1 [L,R]
RewriteOptions inherit
And change them as follows:
#RewriteEngine on
#RewriteCond %{HTTP_HOST} !^222.111.111.222(:80)?$
#RewriteCond %{HTTP_HOST} !^www.domain.com(:80)?$
#RewriteRule ^/(.*) http://www.domain.com/$1 [L,R]
#RewriteOptions inherit
Of course commenting them out like this also breaks siteadmin and
useradmin, but I don't like them anyway <smile>.
Jeff
--
Jeff Lasman <jblists@xxxxxxxxxxxxx>
nobaloney.net
P. O. Box 52672
Riverside, CA 92517
voice: (909) 787-8589 * fax: (909) 782-0205