simran wrote:
Hi All,
I have a auth protected area for the apache server:

Aka, the location /auth is password protected by Perl*Handlers and
usually i only write other PerlHandlers that do things under that
location.
However, i need to put a .shtml file into that diretory (it is also a
normal directory under the document root).
Putting .html files there is no problem, they display fine, however,
.shtml files do not get parsed when in that directory (they work fine
from everywhere else on the server). I assume this is because under that
directory, SetHandler is set to perl-script and not server-parsed?
yes, exactly. SetHandler gets the highest priority, and overrides things such as AddHandler you may have set elsewhere.

Is there a way i can use the "Files" directive (or any other way) to get
the server to parse .shtml files in that directory?
<Files> won't help you once you're in the <Directory> covered by SetHandler (at least I don't think so, but it's early). I'd probably write a PerlFixupHandler to undo the SetHandler for .shtml files or something if you really needed to override your global SetHandler for a given <Directory>. it's generally as simple as

$r->handler('server-parsed') if $r->filename =~ m!\.shtml$!;

but you could probably just as easily remove the SetHandler perl-script in that directory and exchange it for the proper set of AddHandler directives.

HTH

--Geoff



Reply via email to