Re: [squid-users] How about location_rewrite in Squid 3.1?

2012-06-14 Thread Amos Jeffries

On 15/06/2012 3:42 a.m., Mike wrote:

-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1


Hi, I'm using squid3.1 and I too have this problem.

I was wondering if there's any patch or if perhaps this is fixed in
3.2 beta.


We are still waiting on someone to port the 2.7 code over to 3.2.

Amos



Re: [squid-users] How about location_rewrite in Squid 3.1?

2009-09-22 Thread Amos Jeffries

Liu Ming wrote:

Hi,
 
So location_rewrite_* will not be useful until 3.2? I hope it will not 
be too long to make my boss fire me :-)


I did not say that. :)   you can always patch Squid yourself or have 
someone do it for you.


3.2 is available _now_ if you don't mind running alpha quality code that 
_will_ change. Any work done towards porting this feature will go in 
there and be usable soon after acceptance.


 
Could I example my problem more ? maybe you or someone can help me for this:

1) user === www.a.com http://www.a.com === squid server
2) squid server know www.a.com http://www.a.com is another name of 
www.b.com http://www.b.com, so it request www.b.com 
http://www.b.com for caching
3) squid server === www.b.com http://www.b.com === www.b.com 
http://www.b.com server
4) www.b.com http://www.b.com server receive request of www.b.com 
http://www.b.com and then he want user to rediect to 
www.b.com/beta/index.html http://www.b.com/beta/index.html

5) www.b.com http://www.b.com === redirect message === squid server
6) squid server === redirect message === user
7) user redirect to www.b.com/beta/index.html 
http://www.b.com/beta/index.html (PROBLEM!!!, it should be changed to 
www.a.com/beta/index.html http://www.a.com/beta/index.html)
 
what we want is the redirect message can be changed to 
www.a.com/beta/index.html http://www.a.com/beta/index.html, so user 
can still use our squid caching. How can I do ?



Hmm, I've been considering a relatively minor change to deny_info that 
will clean this up, but its not ready yet either :(


There are a few ways to do it in all squid:


 - The one most people seem to like is a url_rewrite_program helper

 - The 'proper' HTTP-based way to do it is this:

 acl httpSafeRedirectA dstdomain www.a.com
 deny_info http://www.b.com httpSafeRedirectA
 http_acecss deny httpSafeRedirectA

... the problem there is that sub-page requests get redirected to the 
root of the alternate domain.


So you will need a 'catcher' script to do a second redirect

 deny_info http://www.b.com/foo.cgi?%s httpSafeRedirectA

script does:
  www.a.com/foo.cgi?http://www.b.com/beta/index.html  -
   (301 permanent move) -  www.a.com/beta/index.html


I'm working right now on a patch that will resolve the extra config 
hassle and scripting.



Amos
--
Please be using
  Current Stable Squid 2.7.STABLE7 or 3.0.STABLE19
  Current Beta Squid 3.1.0.13


[squid-users] How about location_rewrite in Squid 3.1?

2009-09-21 Thread liu ming
Hi,

Is there any detail plan of location_rewrite in Squid 3.1? I need it for
IPv6 reverse cache and rewrite location of www.example.com to
ipv6.example.com


Regards,

Liu Ming



Re: [squid-users] How about location_rewrite in Squid 3.1?

2009-09-21 Thread Amos Jeffries

liu ming wrote:

Hi,

Is there any detail plan of location_rewrite in Squid 3.1? I need it for
IPv6 reverse cache and rewrite location of www.example.com to
ipv6.example.com


Did you mean storeurl_rewrite?

The basic features of 3.1 are frozen for release. location_rewrite (and 
storeurl_*) is in the list of things we hope to look at still for 3.2.


The code has not differed by much yet in 3.1/3.2.  If you would like to 
get someone to do the porting of this feature soonish the patch should 
be easily applicable to 3.1 as well as acceptable for 3.2 merge.



Amos
--
Please be using
  Current Stable Squid 2.7.STABLE7 or 3.0.STABLE19
  Current Beta Squid 3.1.0.13


Re: [squid-users] How about location_rewrite in Squid 3.1?

2009-09-21 Thread Henrik Nordstrom
mån 2009-09-21 klockan 17:07 +0800 skrev liu ming:

 Is there any detail plan of location_rewrite in Squid 3.1? I need it for
 IPv6 reverse cache and rewrite location of www.example.com to
 ipv6.example.com

I am not aware of anyone working on porting that directive no.

Regards
Henrik