[squid-users] Question with ACL and UrlRewrite ?

Aismel aismel.valle at museomusica.cult.cu
Tue Jan 16 21:17:42 UTC 2018


Hi,

 

I need allow  all my users navigate through internet but starting at 14:00pm
to 20:00pm to X pages only so before no one can access to that X pages.

 

I need redirect when a user ask www.facebook.com <http://www.facebook.com>
to m.facebook.com

 

I found this script but do not why don't work

 

#!/usr/bin/perl

$mirror = "m.facebook.com";

 

$| = 1;

while (<>) {

    @line = split;

    $_ = $line[0];

    if (m/^http:\/\/((?:[a-z0-9]+\.)?\.facebook\.com)\/(.*)/ &&

        $1 ne $mirror) {

        print "http://" . $mirror . "/" . $2 . "\n";

    } else {

        print $_ . "\n";

    }

}

 

Pd: I set the chmod +x to the script.

 

Thanks any help

 

Best regards

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.squid-cache.org/pipermail/squid-users/attachments/20180116/6d290e3e/attachment.html>


More information about the squid-users mailing list