Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I've got a Squid3 server set up that's working fine, logging everything, but every time a user visits a website that responds with a 301 or 302 redirect, the request dies and does not redirect the user's browser.

All the research I've done mentions using a rewrite_program or something along those lines, but that appears to be more for intercepting user requests and rewriting them before retrieving them. It seems odd to me that squid would require something like this for external redirects.

Am I doing something wrong? Configuration below.

acl QUERY urlpath_regex cgi-bin \?
cache deny QUERY

# general access
acl localhost src
acl localnet src
acl Safe_ports port 80 443 1025-65535

# User Groups
acl blocked_ips src "/etc/squid3/ip.addresses.blocked"
acl fullaccess_ips src "/etc/squid3/ip.addresses.fullaccess"

http_access allow fullaccess_ips
http_access allow blocked_ips

visible_hostname [mydomainhere].com
always_direct allow all

forwarded_for off

error_directory /usr/share/squid-langpack/English

icp_access allow localnet
icp_access deny all

htcp_access allow localnet
htcp_access deny all

http_port 3128 transparent

hierarchy_stoplist cgi-bin ?

access_log /var/log/squid3/access.log squid

refresh_pattern ^ftp:       1440    20% 10080
refresh_pattern ^gopher:    1440    0%  1440
refresh_pattern (cgi-bin|\?)    0   0%  0
refresh_pattern .       0   20% 4320

icp_port 3130
coredump_dir /var/log/squid3

Thanks for any help... I'm stuck and the client's bellowing that it's not working properly.

share|improve this question
Does the client browser just not get a response at all, or what error do they get? Squid shouldn't be following the redirect, it should just pass the 30x response back to the client. – Shane Madden Mar 2 '12 at 6:14
Browser gets no response at all... after a while it does a "cannot display the webpage" error screen. – Rob Williams Mar 2 '12 at 6:19
Sniff your traffic. SQuid may be sending the redirect but you don't see it. – diegows Apr 19 '12 at 21:03

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.