Re: [squid-users] Questions about referer url cache

From: dave jones <s.dave.jones_at_gmail.com>
Date: Tue, 16 Mar 2010 10:08:19 +0800

On Sat, Mar 13, 2010 at 2:35 AM, Henrik Nordstrom wrote:
> fre 2010-03-12 klockan 23:36 +0800 skrev dave jones:
>> My question is I want to offline browse the index.html of foo.com,
>> but there are many "http://us.rd.foo.com/referurl/news/index/realtime/*"
>> in index.html, would anyone tell me how do I solve that referer url to direct
>> the correct one, like
>> "http://us.news.foo.com/article/url/d/a/100312/11/21ycr.html".
>> Thank you very much.
>
> See the url_rewrite_program option in squid.conf.

Thanks. I use url_rewrite_program /etc/squid/redirect_test.php,
but it seems my program doesn't work...

!/usr/local/bin/php
<?php

$temp = array();

while ( $input = fgets(STDIN) ) {
  $temp = split(' ', $input);
  $url = split('[*]', $temp[0]);
  $output = $url . "\n";

 echo $output;
}

Would anyone tell me how to solve it? Thanks.

Regards,
Dave.
Received on Tue Mar 16 2010 - 02:08:25 MDT

This archive was generated by hypermail 2.2.0 : Tue Mar 16 2010 - 12:00:03 MDT