Hello tlm,
Voila un script de redirection PERL :
J'aimerai y ajouter un <META NAME="robots" CONTENT="noindex,nofollow">
Mais ne connaissant rien au PERL, je m'y perd :cry:
Quelqu'un aurait la solution ?
Voila un script de redirection PERL :
Code:
#!/usr/bin/perl
@date = localtime(time); $date[4]++;
$Time = "$date[4]/$date[3]/$date[5]";
$Query_File = $ENV{QUERY_STRING};
$Query_File =~ s/%([0-9A-F][0-9A-F])/pack("C",oct("0x$1"))/ge;
$Query_File =~ tr/+/ /;
($url) = split(/\&/,$Query_File);
if ($url =~ /=/) {
($name, $url) = split(/=/, $url);
}
if ($url =~ /^(ht|f)tp:\/\//) {
print "Location: $url\n\n";
} else {
&Error("Erreur, votre url doit commencée par http:// ou ftp://\n");
}
sub Error {
my($ErrorText) = @_;
print "Content-type: text/html\n\n";
print "Erreur : ".$ErrorText;
exit;
}
J'aimerai y ajouter un <META NAME="robots" CONTENT="noindex,nofollow">
Mais ne connaissant rien au PERL, je m'y perd :cry:
Quelqu'un aurait la solution ?