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.