-
Book Overview & Buying
-
Table Of Contents
Squid Proxy Server 3.1: Beginner's Guide
Let's see a very simple Perl script that can act as a URL redirector program.
$|=1;
while (<>) {
s@http://www.example.com@303:http://www.example.net@;
print;
}The previous code is a URL redirector program in its simplest form. It redirects all URLs containing the URL www.example.com to www.example.net without inspecting values of any of the fields by Squid.
We have just seen a simplistic Perl script which can act as a URL redirector program and can be used with Squid.
Modify the previous URL redirector program so that all requests to google.co.uk can be redirected to google.com.
We can make our URL redirector programs concurrent for better performance. When we configure Squid to use a concurrent URL redirector program, it passes an additional field, ID, on the standard input to the redirector program. This is used to achieve concurrency as we learned...
Change the font size
Change margin width
Change background colour