John M. Dlugosz has asked for the wisdom of the Perl Monks concerning the following question:
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>
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: Mason newbe question
by ForgotPasswordAgain (Vicar) on Jul 15, 2008 at 07:13 UTC | |
by John M. Dlugosz (Monsignor) on Jul 15, 2008 at 07:47 UTC | |
by ForgotPasswordAgain (Vicar) on Jul 16, 2008 at 06:45 UTC | |
by John M. Dlugosz (Monsignor) on Jul 17, 2008 at 01:54 UTC | |
|
Re: Mason newbe question
by pjotrik (Friar) on Jul 15, 2008 at 07:48 UTC | |
|
Re: Mason newbe question
by Anonymous Monk on Jul 15, 2008 at 07:45 UTC | |
|
Re: Mason newbe question
by wade (Pilgrim) on Jul 15, 2008 at 15:26 UTC | |
by Anonymous Monk on Jul 16, 2008 at 05:15 UTC |