[mod_python] <Location> vs <Directory> ?

Bob Ippolito bob at redivi.com
Sun Dec 2 09:08:22 EST 2001

It seems to be possible to use <Location /some/url> instead of <Directory /some/path> with mod_python.

It can be desirable at times to be able to use a PythonHandler at any arbitrary URL, not just directories or files with the .py extension.  I didn't see this documented anywhere, or talked about on the list (at a glance of subjects for the past couple months).  This way you can make a python script look like a single file.. i.e.

<Location /some/url/somefile.html>
  SetHandler python-program
  PythonHandler myHandler

this won't affect other .html files at /some/url.


More information about the Mod_python mailing list