[mod_python] How to hide implementation specifics in URIs/URLs?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Mon Jan 7 22:51:23 EST 2002

Take a look at the Apache SetHandler directive, I think it does what you


On Mon, 7 Jan 2002, Matthew England wrote:

> At 1/7/2002 08:08 PM, Rich Salz wrote:
> > > <http://www.w3.org/Provider/Style/URI.html>.  Specifically, I'd like to
> > > eliminate the references to ".py" in my mod_python-managed URIs.  What are
> > > my apache options to do this?
> >
> >AddHandler python-program .py
> >DirectoryIndex index.py index.php index.html
> Thanks for the quick response.  This appears to only work if i create a
> subdirectory with index.* files in it.  While this does get me one step
> closer to my goal, it doesn't get me all the way there.  Maybe I'll just
> have to deal with it?
> To be a little more specific:
> On my server, the URI:
>    <>
> prints some arbitrary text in the browser display.
> I wanted:
>    <>
> (without the ".py") to do the same thing.  And I want this to work with any
> file in the web-server directory space (or any directory space that i want).
> In order to get this to work with the above suggestion, i have to make a
> "mptest" subdirectory and copy mptest.py to mptest/index.py.  Not as
> convenient as i would like for the developers.  Furthermore, my user has to
> include a "/" at the end of the URI in order to ensure relative-link
> reference in the host/domain part of the URI (or at least, that seems to be
> the apparent behavior...something which i don't fully understand
> yet).  Otherwise without the trailing "/" i get a reverse-dns-lookup
> happening that replaces the host-domain part of the URI automatically (at
> least with my apache-server and opera-client).  This is undersire-able for
> my system.
> -Matt
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://www.modpython.org/mailman/listinfo/mod_python

More information about the Mod_python mailing list