[mod_python] Use mod_python for root/home page requests

Ben Leslie benno at sesgroup.net
Wed May 9 11:24:48 EST 2001


On Tue, 08 May 2001, Chris Hagner wrote:

> I currently have mod_python wired into a location (Specifically <Location
> />) that allows all request coming under this location to be handled by my
> handler.  I also use SetHandler instead of AddHandler so that it doesn't
> even matter what file extension/type is requested.  My goal here is to have
> an apache instance that has ALL of its requests go through mod_python.
> 
> Now, the strange thing is that this works great for all requests except for
> the root/home page.  For example,
> 
> http://www.mydummysite.com/blahblah
> 
> This works great... my handler is called and is responsible for
> interpretting 'blahblah'.  However,
> 
> http://www.mydummysite.com/
> 
> This fails to go to the handler and instead looks for the default page
> (index.html) in the DocumentRoot.  Thus, my Location directive doesn't
> appear to be inclusive of the request to the base home URL.
> 
> Has anyone tried this before?  I'd prefer to achieve this without relying on
> mod_rewrite.



Mmm I think you need to change the "index" dirrective (not sure what its called,
I'm at uni at the moment, search for index.html). Then you want to add index.py
to this. That should in theory work.

Cheers,

Benno



More information about the Mod_python mailing list