[mod_python] Servlet and images.

Gregory (Grisha) Trubetskoy grisha at modpython.org
Sun Sep 12 21:46:33 EDT 2004

Create a subdirectory (e.g. images), then put an .htaccess with 
"SetHandler None" in it. Put your images in this directory. They won't be 
in the same directory technically speaking, but it will probably achieve 
what you want.

Otheriwise, if you really insist on the same directory, you either must 
use AddHandler instead of SetHandler, or write your handler such that it 
knows how to treat images (e.g. sends them using req.sendfile()).


On Sat, 11 Sep 2004, FC wrote:

> Hello,
> I'm playing with mod_python and the servlet module from Daniel Popowich and I 
> wanted to know how can I have python code and images in the same directory.
> My htaccess file look like this:
> SetHandler mod_python
> PythonHandler mod_python.servlet
> PythonDebug on
> Apache try to run every file through the servelet module. I have also try to 
> change SetHandler in my htaccess file to AddHander mod_python .mps and 
> AddHandler mod_python .py but that doesn't work.
> Fred
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list