Soccer Fever and those (horrid) Vuvuzelas

So I got stuck on some mathematical calculations to get some multi-level paging system done. And getting the breakdowns right. And someone discovered … well, some may recall the blue-bulls hack we pulled on google a whilst back. Well, by now I reckon you can add the two together.

This time was a tad more tricky. just loads the url passed as an iframe, so just doing an outright rewrite is a tad more tricky. The redirect program from last time required a few adjustments, and ended up looking like this:


while (<>) {
    if ($_ =~ /http:\/\/www\.google\.([^\/]*)\/? /i) {
        print "$1/webhp\n";
#   elsif ($_ =~ /http:\/\/www\.google\.[^\/]+\/intl\/en_com\/images\/logo_plain.png/i) {
#       print "\n";
#   }
#   elsif ($_ =~ /http:\/\/www\.google\.[^\/]+\/images\/nav_logo7.png/i) {
#       print "\n";
#   }
        print $_;

Then just add the redirect stuff in /etc/squid/squid.conf back:

url_rewrite_program /etc/squid/redirect
url_rewrite_children 10

And now you can hear whenever anybody is in need of assistance from google :p.

Comments are closed.