1

默认情况下,当我请求图像文件时 - 石匠处理程序会触发autohandler吗?只有.html文件被设置为由 mason 在配置文件中处理。我需要它来做一些后台任务,但我不希望图像文件本身被处理。请指教...

更新,我将尝试以下内容autohandler

return -1 if $r->content_type && $r->content_type !~ m|^text/|i;

并带有以下内容apache2.conf

<FilesMatch "(.*)>
4

1 回答 1

0

尝试使用 LocationMatch:

<LocationMatch "\.(css|html)$">
    SetHandler perl-script
    PerlHandler ...# it depends on your current configuration
</LocationMatch>

您还说您不想处理图像,将这些图像文件放在另一个目录中并让默认处理程序为其提供服务:

<Location /images>
    sethandler default-handler
</Location>
于 2013-11-27T15:08:37.100 回答