in reply to mod_perl and HTTP::Mason acting funky

1. see Allowing Directory Requests in the mason administrators manual. you'll probably want something like PerlSetVar MasonDeclineDirs 0 in your Location segment.

2. your images are being served by mason, and are probably coming with the leading part of the HTML from the autohandler (or similar, depending on your setup.)

consider using a <LocationMatch ...> instead:

<LocationMatch "\.html$"> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler PerlSetVar MasonDeclineDirs 0 </LocationMarch> <LocationMatch "(\.m(html|txt|pl)?|dhandler|autohandler)/?$"> SetHandler perl-script PerlInitHandler Apache::Constants::NOT_FOUND PerlSetVar MasonDeclineDirs 0 </LocationMatch>
see Controlling Access via Filename Extension

Replies are listed 'Best First'.
Re^2: mod_perl and HTTP::Mason acting funky
by Anonymous Monk on Aug 30, 2006 at 12:59 UTC
    That was really useful, but i couldn't seem to find any documentation about using a location match using sub directorys, eg "/dir/dir/\.html" but that wont work. Any ideas? / This is not really perl at all is it :P /
      LocationMatch uses regex, so you would want something like <LocationMatch "/dir/dir/[^/]*\.html$"> (/dir/dir/*.html only) or <Location Match "/dir/dir/.*\.html$"> (any *.html below /dir/dir/)