Re: [squid-users] URL redirection

From: rcbandit <rcson_at_abv.bg>
Date: Tue, 5 May 2009 13:08:30 -0700 (PDT)

Amos Jeffries-2 wrote:
>
>>
>> Hi,
>> I would like to ask you is there a way to configure squid to redirect
>> IPs.
>> I want squid to read IP's from file saved in .TXT format saved on HDD or
>> server on internet. And when user's IP matches with the IP from the TXT
>> file
>> squid redirects it to external URL hosted on remote server.
>
> Umm, what exactly are you trying to do with this?
> There are several scenarios each with different solutions possible.
>
> Please note the IPs do not have a 1:1 relationship with URLs so rewriting
> a URL based on it's IP is not generally possible.
> For example, the URL http://www.google.com/ for example has several
> hundred geo-located IPs (not all of which are visible at any time or at
> all), and each of those IPs has a few dozen domain names.
>
>
>> Second question - is there a way to configure squid to read the external
>> TXT
>> file every 10 minutes for example so when I manually enter new IP or
>> remove
>> old one squid reads it and reconfigure itself.
>
> No.
> For this type of thing use an external_acl_type helper. They are tested
> live for every request with an optional caching time in seconds for the
> results.
>
> I'm getting a vague Idea about what you are trying to do, I don't think
> you want redirection at all. But please state what it is clearly so we can
> be of more help.
>
> Amos
>
>
>

I want to write a PHP billing system for ISPs and web hosting. It's a hobby
project.
My idea is to control the access to the internal servers with squid and PHP
program. When the owner of the server don't pay squid blocks the access.
I will write a PHP program witch will pass IPs to the squid using .TXT file.
Squid reads the IPs from the file and blocks the access. So I need a way to
force squid to read that .TXT file.

-- 
View this message in context: http://www.nabble.com/URL-redirection-tp23378517p23394984.html
Sent from the Squid - Users mailing list archive at Nabble.com.
Received on Tue May 05 2009 - 20:08:33 MDT

This archive was generated by hypermail 2.2.0 : Wed May 06 2009 - 12:00:02 MDT