Search squid archive

Re: What might be a foolish question about url redirects

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

 



On 22/12/2012 11:34 a.m., Brian Dunbar wrote:
1. A requirement came across my desk a few weeks ago.  Not sure if
'squid' is the right tool for this, or not.  It _could_ be but I'm not
an expert by any means.  All feedback appreciated.



2. What the developer and PM want is ..

- Set a static URL like myurl.intranet.company.com.

- myurl.intranet.company.com redirects to realhostname.eu.company.com

- A script - living at 'realhostname' - changes the redirect to whatever.

- There could be a dozen or so of these, a one to one basis

myurl > realhost1
myurl2 > realhost2
myurl3 > realhost3

And so on.


3. We went to and fro and (it's complicated) changing the value in DNS
is not going to work.  Gotta be a URL redirect, and the PM insists it
be scriptable from the app host.


It looks like I can use the url_rewrite_program directive, a bit of
bash/perl/PHP [1] and call it a day;

if $input = URL1 then $output = realhost1


4. Am I barking up the wrong tree?  Is there a better way to make all
this happen?

Seems simple enough. Just ensure that the URL helper is doign HTTP redirect (sending 30x messages out for the URL change).

If you make the helper use a database to source its pattern and destination data that database can be updated by the external machines that need to change things.


The alternative if you want to hide the URL destination from the clients, (NOT doing URL re-write) is to use an external_acl_type helper which tags each request with a tag the cache_peer_access list checks for in determining which peer to send it to.

Amos


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

  Powered by Linux