use Apache::SubRequest; my $subr = $r->lookup_file($file); return 404 unless -f $file and $subr->status == 200; $r->content_type($subr->content_type); $r->send_http_header; return 200 if $r->header_only; $subr->run; $m->abort;