package myHandler;
use strict;
use Apache;
use Apache::Constants wq(:response);
sub handler {
my $r = shift;
my $uri = $r->uri();
unless ($uri =~ /\.extension$/) {
return DECLINED;
}
# rest of code
####
SetHandler perl-script
PerlHandler myHandler
Options Indexes Includes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
####
[root@styx conf]# telnet localhost 80
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
GET /test/you_are_not_here HTTP/1.0
Connection closed by foreign host.