[mod_python] Automaticaly requesting "index.py/index"

Graham Dumpleton grahamd at dscpl.com.au
Mon Oct 24 18:32:51 EDT 2005


Fabien Schwob wrote ..
> Hello,
> 
> I'm currently trying to develop a website in python and I have a problem
> to automatically request the "index.py/index" url.
> 
> I have a script called index.py at the url http://jibaku.net/beta/ and
> when I type the previous url, I only get a "404 Not Found". I must
> request http://jibaku.net/beta/index.py/index to get the correct page.
> So, is there a solution to tell mod_python to automatically get :
>      http://jibaku.net/beta/index.py/index
> when I type
>      http://jibaku.net/beta/
> 
> My configuration is an .htaccess in the beta/ folder and it contain :
> 
> AddHandler python-program .py
> PythonHandler mod_python.publisher
> 
> Thanks in advance for your help.

Try:

  DirectoryIndex index.py

Otherwise it will only work when you are using the SetHandler
directive and not AddHandler. Using SetHandler will cause all
requests against the directory to be intercepted and handled
by mod_python.publisher, which may not be what you want.

Graham


More information about the Mod_python mailing list