Search squid archive

Re: Redirect from abc.com to xyz.com

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

 



lör 2007-01-06 klockan 16:10 +0100 skrev MrMarc NL:
> When I user requests abc.com I want Squid to redirect to xyz.com. Can
> this be done by Squid or do I need a seperate program for this. If so,
> can I use 2 redirect programs within Squid since I already use
> bannerfilter

Here is one way using just squid.conf:

acl abc_com dstdomain abc.com
http_access deny abc_con
deny_info http://xyz.com abc_com


The other is to use a chain of url_rewriters.

#!/bin/sh
exec 4>&1
redirector1 |
while read url rest; do
	if [ -n "$rest" ]; then
		echo "$url $rest"
	else
		echo "$url" >&4
	fi
done |
redirector2

Regards
Henrik

Attachment: signature.asc
Description: Detta =?ISO-8859-1?Q?=E4r?= en digitalt signerad meddelandedel


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

  Powered by Linux