I read the article at http://www.perl.com/pub/a/2004/04/01/masongal.html and installed http://search.cpan.org/dist/faceplant, and figured out enough to get it almost working. But I still can't figure something out.
A URL like <http://bkcg.lamp4/gallery/June> gives a 404, "The requested URL /gallery/June was not found on this server." A URL like <http://bkcg.lamp4/gallery/June/_MG_2571.JPG.html> works as expected.
The real directory docroot/gallery contains files autohandler.mason, dhandler.mason, and index.html, and subdirectories css, images, js, and pictures. index.html is just inherit => 'dhandler.mason' in flags. Everything with a URL under gallery is really made up by this script.
Meanwhile, <http://bkcg.lamp4/gallery> itself does not work either, but <http://bkcg.lamp4/gallery/index.html> does. Note that automatically finding the index.html file works on other locations. This offers a work-around for the top-level gallery, anyway.
Presumably this worked for him! I'd like to better understand what the deal is with directories vs locations in a directory when handled by a higher-level in the URI's name. And I need to know what is still wrong here.
Here is my configuration:
# site-wide setting
<LocationMatch "(\.html|\.txt)$">
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</LocationMatch>
# all URI's here, will include names for graphics files + query args.
<Location /gallery/images>
SetHandler perl-script
PerlHandler HTML::Mason::ApacheHandler
</Location>
# keep private stuff from being explicitly fetched
<LocationMatch "(\.mason|dhandler|autohandler)$">
SetHandler perl-script
PerlInitHandler Apache::Constants::NOT_FOUND
</LocationMatch>
In reply to Mason newbe question by John M. Dlugosz
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |