[mod_python] does add_handler even work?

Graham Dumpleton grahamd at dscpl.com.au
Tue Oct 12 22:34:35 EDT 2004


On Oct 12 19:31, Johannes Erdfelt <johannes at erdfelt.com> wrote:
>
> Subject: Re: [mod_python] does add_handler even work?
>
> On Tue, Oct 12, 2004, Graham Dumpleton <grahamd at dscpl.com.au> wrote:
> > On Oct 12 17:37, Johannes Erdfelt <johannes at erdfelt.com> wrote:
> > 
> > Vampire can be found at:
> > 
> >   http://www.dscpl.com.au/projects/vampire
> 
> I looked at Vampire at one point and it too seems to have the same
> problem with PHP and autoindex as I've been running into.
> 
> Or am I mistaken?

Try adding the following after the SetHandler for mod_python.

  <Files *.php>
  SetHandler None
  </Files>

For example, in my .htaccess file I have put:

  SetHandler python-program
  PythonHandler vampire

  <Files *.php>
  SetHandler None
  </Files>

Just for .php files, it should undo the SetHandler directive used above that point.
 his appears to now allow me to dump PHP files in the same directory as that
managed by mod_python using a SetHandler directive.

In respect of mod_autoindex, is the problem you have that with Apache 1.3, a
reference against the directory would still honour setting of DirectoryIndex and
thus redirect to index.html as an example, but with Apache 2.0 it doesn't?

I found this problem with Apache 2.0 as well, although I note that in Apache 1.3
it only worked for the top level directory managed by mod_python. If there were
subdirectories under that, it wouldn't work for them anyway.

In Vampire 1.1 I specifically have a setting, eg:

  PythonOption VampireDirectoryIndex index.html

to get around this problem. That is, I handle the redirection with Vampire when a
directory access occurs. With Apache 1.3, I use a HTTP redirect, but with Apache 2.0
I use an internal redirect.

I have an actual note about this issue on updated web page I put up for Vampire 1.1.

Hope this helps.

--
Graham Dumpleton (grahamd at dscpl.com.au)


More information about the Mod_python mailing list