Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- $|=1;
- while (<>) {
- chomp;
- @X = split;
- $url = $X[0];
- if ($url =~ m/^https:\/\/.*\.youtube\.com/) {
- print "OK status=302 url=http://www.youtube.com\n"
- #print "OK rewrite-url=http://www.youtube.com\n";
- } else {
- print "ERR\n";
- }
- }
- Config squidnya:
- #Redirect ucub
- acl ucub dstdomain .youtube.com
- url_rewrite_access allow ucub
- url_rewrite_program /etc/squid/redirectucub.pl
- url_rewrite_children 7
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement