Wondering if the htsearch can be modified to support "referer"
tag. I want to restrict hosts to use the "htsearch" cgi.
Frank
sub check_url {
@referers = ('http://site1.com','http://site2.com');
if ($ENV{'HTTP_REFERER'}) {
foreach $referer (@referers) {
if ($ENV{'HTTP_REFERER'} =~ /$referer/i) {
$check_referer = '1';
last;
}
}
}
else {
#for old browsers
$check_referer = '1';
}
if ($check_referer != 1) {
print "<TITLE>Bad Referrer - Access Denied</TITLE>\n";
print "</HEAD>\n";
print "<BODY BGCOLOR=\"#FFFFFF\">\n";
print "<H1>";
print "Bad Referrer - Access Denied";
print "</H1>";
print "The form that is trying to use cgi program\n";
print "resides at: $ENV{'HTTP_REFERER'}, which is not ";
print "allowed to access this cgi script.<p>\n";
print "</BODY>\n";
print "</HTML>\n";
exit;
}
}
----------------------------------------------------------------------
To unsubscribe from the htdig mailing list, send a message to
[EMAIL PROTECTED] containing the single word "unsubscribe" in
the body of the message.