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

From: <badaboom003-asdf@dont-contact.us>
Date: Mon, 30 Apr 2007 19:34:19 -0700 (PDT)

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.

I then set up Squid 2.6 as an accelerator on the same
machine. It also works.

However, it breaks my mod_rewrite. it treats
mysite.com and www.mysite.com as 2 different sites (in
fact, asking for basic web authentication again with
each one).

I set up squid with standard configuration. below are
the only lines i added in squid.conf. The lines were
added in the appropriate places.

Any help would be greatly appreciated. thanks.

(IP address is x'd out)

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

cache_peer 127.0.0.1 parent 80 0 no-query originserver
login=PASS

visible_hostname www.mysite.com

acl port80 port 80

http_access allow port80
----------------------------
Received on Mon Apr 30 2007 - 20:34:28 MDT

This archive was generated by hypermail pre-2.1.9 : Tue May 01 2007 - 12:00:01 MDT