Hi Gary
I didn't see anyone answer this, and was curious, so I wrote a simple
little one. I'm not sure if this was what you were looking for, but it
just logs the refering page and destination url and redirects.
It would be almost as simple to do a masking style redirect to hide urls
you are redirecting to if you want.
call it from html like this
<a href="/cgi-bin/redir.pl?http://slashdot.org">Slashdot</a>
#!/usr/bin/perl
# simple redir script
use CGI;
# logfile
my $logFile = "/tmp/redir.log";
# file locking constants
$LOCK_EX = 2; # exclusive lock
$LOCK_UN = 8; # unlock
# get the url
my $query = new CGI;
my $url = $query->param("keywords");
# log it
open (LOG, ">>$logFile");
flock(LOG, $LOCK_EX);
print LOG $query->referer(), "\t", $url, "\n";
flock(LOG, $LOCK_UN);
close LOG;
# do the redirect
print $query->redirect( $url );
# done!
seeya
charles
On Wed, 4 Oct 2000, Gary Nielson wrote:
> Does anyone know of a script like this one listed below that would be in
> perl and run under Unix? I am trying to find a way to do this, but this
> executable is for NT.
>
> http://www.analogx.com/contents/download/network/cgirdir.htm
>
>
>
>
>
>
> _______________________________________________
> Redhat-list mailing list
> [EMAIL PROTECTED]
> https://listman.redhat.com/mailman/listinfo/redhat-list
>
_______________________________________________
Redhat-list mailing list
[EMAIL PROTECTED]
https://listman.redhat.com/mailman/listinfo/redhat-list