Search squid archive

Re: Re: 301 redirection with Squid based on URL (is Squirm the fastest way?)

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

 



On 01/10/11 14:53, Manuel wrote:
Forget about the previous code, there was some errors. Something like this is
my idea to deal with the redirections:

cache_peer 172.20.1.3 parent 80 0 no-query no-digest originserver
name=mainweb
acl maindomain dstdomain www.my.domain
cache_peer_access mainweb allow maindomain
cache_peer_access mainweb deny all

cache_peer 172.20.1.4 parent 80 0 no-query no-digest originserver
name=allredirects
acl otherdomains dstdomain !www.my.domain

Matches this:
 http://!www.my.domain/

You want to drop the "otherdomains" ACL and replace this line:

cache_peer_access allredirects allow otherdomains

with this:
 cache_peer_access allredirects allow !maindomain

cache_peer_access allredirects deny all

And I will use apache with mod_rewrite in that cache_peer in order to avoid
caching by the browsers:
RewriteRule ^/(.*)$ http://www.my.domain/$1 [R=301,L,E=nocache:1]


Other than that tweak it looks usable.

Amos
--
Please be using
  Current Stable Squid 2.7.STABLE9 or 3.1.15
  Beta testers wanted for 3.2.0.12


[Index of Archives]     [Linux Audio Users]     [Samba]     [Big List of Linux Books]     [Linux USB]     [Yosemite News]

  Powered by Linux