|
How many of you guys are going to ask for this today???
You gotta learn to do a quick search or pick up a basic CGI
book. ...Here is perl.
Without logging:
#!/usr/bin/perl
$URL = $ENV{QUERY_STRING};
print "Location: $URL\n\n";
With logging:
#!/usr/bin/perl
$URL = $ENV{QUERY_STRING};
open (LOG,'>>/usr/local/www/cgi-bin/reflog.txt');
print LOG "$ENV{'REMOTE_ADDR'} $ENV{'REMOTE_HOST'} -> $URL\n";
close (LOG);
print "Location: $URL\n\n";
If you've got a wacky client (browser) you may have to send the header.
__________________
This AVS pays my mortgage!
|