Search squid archive

Re: Rewrite url to remove folder path

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

 



On 11/01/2013 12:32 a.m., tomsl wrote:
I am testing squid as a reverse proxy in front of a website. What I am trying
to do is to get some media files from a different server when they are
requested from the main site, example:

If I try to access proxy.mysite.com/media/images/image.jpg, the site
actually gets the image from a different server, in this case from the
rackspace cloudfiles cdn. I can get squid to use the cdn domain when getting
the files however it still tries to get in from /media/images on the
destination server which will not work. What I need to do is instead of
making squid get the file from:

somecontainer.rackcdn.com/media/images/image.jpg

it actually gets:

somecontainer.rackcdn.com/image.jpg

How would I go about this?

By re-writing the URL with a helper script and the url__rewrite_program directive.
http://www.squid-cache.org/Doc/config/url_rewrite_program/
http://wiki.squid-cache.org/Features/Redirectors

Amos


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

  Powered by Linux