- Code: Select all
RewriteMap robots prg:d:/webserver/apache/bin/modrw.pl
The Perl Script looks like that:
- Code: Select all
#!d:\webserver\perl\bin\perl.exe
$| = 1;
my %robots;
open(ROBOTS,"<d:\\webserver\\apache\\bin\\robots.txt");
while(<ROBOTS>)
{
#chomp($_);
#$robots{$_} = "robot";
#print $_."=".$robots{$_}."\n";
}
close(ROBOTS);
while(<STDIN>)
{
chomp($_);
#if(exists $robots{$_})
#{
# print $robots{$_}."\n";
#}
#else
#{
#print "NULL\n";
#}
print "robot\n";
}
The server starts and no problems occur up to the moment I do a request. It is not redirected (as I wanted it to) but the requested page is displayed. In the rewrite.log i can find the following entry:
- Code: Select all
127.0.0.1 - - [13/Oct/2004:21:17:14 +0200] [xxx/sid#5b5800][rid#cc3440/initial] (5) map lookup FAILED: map=robots key=Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
Can anybody tell me why my (really, really simple) Map does not work? Is it cause i am using Windows?
Thank you
Angel