Re: [squid-users] Squid breaks Apache mod_rewrite for canonical hostnames

From: Henrik Nordstrom <henrik@dont-contact.us>
Date: Tue, 01 May 2007 09:29:29 +0200

mån 2007-04-30 klockan 19:34 -0700 skrev badaboom003-asdf@yahoo.com:
> I'm running an Ubuntu LAMP server with standard
> configuration. I have the following lines in my
> .htaccess file for mod_rewrite (domain name changed):
>
> Options Includes ExecCGI +Indexes +FollowSymLinks
> RewriteEngine On
> RewriteCond %{HTTP_HOST} ^mysite\.com [NC]
> RewriteRule ^(.*) http://www.mysite.com/$1 [R=301,L]
>
> It works just fine.

This configuration is sensitive on the domain name, redirecting the user
to www if no www was specified.

> http_port xxx.xxx.xxx.xxx:80
> defaultsite=www.mysite.com

And this is not.. only supporting the single www domain. To support
domain-based virtual hosting you need the vhost directive in addition.

Regards
Henrik

Received on Tue May 01 2007 - 01:29:36 MDT

This archive was generated by hypermail pre-2.1.9 : Fri Jun 01 2007 - 12:00:04 MDT