[mod_python] eliminating last foo.py from url?

Mark Harrison mh at pixar.com
Mon Dec 18 02:26:49 EST 2006


Mark Harrison wrote:
> So, I've pretty much copied the standard directory configuration,
> 
> <Directory "/apache/htdocs/appserv">
>         AddHandler mod_python .py
>         PythonHandler appserv
>         PythonDebug On
> </Directory>
> 
> and I can reference my service by http://foo.com/appserv/appserv.py
> (or any other .py in that directory, of course).
> 
> How can I make it such that I can reference with the trailing foo.py?

Alias seems to be the key...

<Directory "/Users/mh/mp/htdocs/xmlrpc/x1">
   AddHandler mod_python .py
   PythonHandler x1
</Directory>
Alias /x1 /Users/mh/mp/htdocs/xmlrpc/x1/.py

Thanks all!
Mark

-- 
Mark Harrison
mh at pixar.com


More information about the Mod_python mailing list