Re: redirect all requests to 1 page?

From: Dancer <dancer@dont-contact.us>
Date: Sat, 13 Nov 1999 03:07:09 +0000

Jonathan Young wrote:
>
> We have been using squid without problems for quite some time on one of our
> linux boxes but we no longer are in need of proxying. Given the large
> number of remote users using our proxy server, it will be very difficult to
> inform them all of the change and provide documentation on reconfiguring
> their browsers.
> We would like to configure squid to redirect all queries, regardless of type
> or location to a single file which will contain instructions on
> reconfiguring their web browser to turn off the proxy server.
> I can't figure out to do this; it would seem to be possible as this is quite
> similar to what happens when an invalid DNS name is requested except we want
> this for all requests. Thanks in advance and I will summarize for the list.
> Jon
> Sys Admin
> College of Business
> University of Florida

You can use a redirector script. Here is an outline

#!/usr/bin/perl

$|=1;

while(1)
        {
        # Allow any images or screen-shots from the directory to pass.
        /reconfigure_your_browser/ && print && next;
        # Send everything else to the instructions page
        print
"302:http://www.ourselves.com/reconfigure_your_browser/instructions.html";
        }

# I've not tested this. I've spent less than 60 seconds on this email.
# Carpe intellectum
Received on Fri Nov 12 1999 - 19:46:20 MST

This archive was generated by hypermail pre-2.1.9 : Wed Apr 09 2008 - 11:57:32 MDT