FWIW, I looked into doing this for myself today, and found that if you're already using Squid (as I am), then this is quite easy to set up without requiring new software. I have in /etc/squid/squid.conf:
/etc/squid/squid.conf
redirect_program /etc/squid/redirector acl LIVEJOURNAL dstdomain .livejournal.com redirector_access LIVEJOURNAL
... and in /etc/squid/redirector:
/etc/squid/redirector
#! /usr/bin/perl -w use strict; $| = 1; while (<>) { my @args = split; my $url = $args[0]; if ($url =~ m[^https?://[^/]*\.?livejournal\.com/] and $url !~ /\.bml/ and $url !~ /style=mine/) { my $newurl; if ($url =~ /\?/) { $newurl = "$url&style=mine"; } else { $newurl = "$url?style=mine"; } print "302:$newurl\n"; } else { print "\n"; } }
I could probably do a better job of the redirector script, of course!
Reposted without auto-formatting. Grr.
FWIW, I looked into doing this for myself today, and found that if you're already using Squid (as I am), then this is quite easy to set up without requiring new software. I have in
/etc/squid/squid.conf:... and in
/etc/squid/redirector:#! /usr/bin/perl -w use strict; $| = 1; while (<>) { my @args = split; my $url = $args[0]; if ($url =~ m[^https?://[^/]*\.?livejournal\.com/] and $url !~ /\.bml/ and $url !~ /style=mine/) { my $newurl; if ($url =~ /\?/) { $newurl = "$url&style=mine"; } else { $newurl = "$url?style=mine"; } print "302:$newurl\n"; } else { print "\n"; } }I could probably do a better job of the redirector script, of course!
Reposted without auto-formatting. Grr.