Hi,
May be you can try it with url_rewrite_program
=====squid.conf====
url_rewrite_program /usr/sbin/url_redirect.php
url_rewrite_children 5
====/usr/sbin/url_redirect.php=======
#!/usr/bin/php
<?php
$temp = array();
while ( $input = fgets(STDIN) ) {
// Split the output (space delimited) from squid into an array.
$temp = split(' ', $input);
// Set the URL from squid to a temporary holder.
$output = $temp[0] . "\n";
// Clean the Requesting IP Address field up.
$ip = split('/',rtrim($temp[1], "/-"));
if (preg_match("/^http:\/\/www.yahoo.com/i", $temp[0])) {
$output = "301:http://www.google.com\n";
}
echo $output;
}
|