HTML::Mason handle nonexistent directories

HTML::Mason handle nonexistent directories

am 14.06.2005 20:45:36 von bennymack

Hello all,

I am trying to handle requests to nonexistent directories with a
dhandler in HTML::Mason but I'm not having much luck.

I have set decline_dirs => 0 in my handler.pl per
http://www.masonhq.com/docs/manual/Admin.html#allowing_direc tory_requests

I have put mod_perl.c before mod_dir.c in the httpd.conf AddModule per
http://www.masonhq.com/?HandlingDirectoriesWithDhandlers

But still nothing. According to this page
http://www.masonbook.com/book/chapter-3.mhtml it should be possible
although it doesn't outline exactly how to accomplish it.

Somone also suggested using PerlTransHandler. Can anyone suggest the
best way to accomplish this? Hopefully something that has proven to be
successful in the past? Thanks!

Re: HTML::Mason handle nonexistent directories

am 15.06.2005 03:27:25 von bennymack

Solution:

>From link #3 above

SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler


In additional, you'll most likely need to add a line to your srm.conf
otherwise apache will send a text/plain header with any of the
nonexistent directories it serves. Add DefaultType text/html to your
srm.conf.