[mod_python] URLs

Jim Gallacher jg.lists at sympatico.ca
Wed Jun 1 14:52:05 EDT 2005


Alexis,

You'll need to create your own handler.

Take a look at the first 10 or 20 lines of the handler in 
mod_python/publisher.py as a guide. It pretty much does what you want.

To quickly summarize, you'll need to examine req.filename (which will be 
index.py in your case) and req.path_info, which will contain everything 
in the url after index.py, ie. "/this/path/is/not/to/be/processed".

Strictly speaking, you'll need a url more like:
http://example.com/index/this/path/is/not/to/be/processed.

in which case a filename other than index.py will likely make more sense.

Regards,
Jim

Alexis Marrero wrote:
> I want to configure mod_python to not process the URL and just handle 
> the request at the root level.
> 
> In other words, a request to:
> 
> http://example.com/this/path/is/not/to/be/processed
> 
> Needs to be handled by index.py at the root level. And index.py 
> internally process the rest of the URI 'this/path/is/not/to/be/processed'.
> 
> So, my question is how can I configure mod_python for accomplishing this.
> 
> Regards,
> /amn
> 
> 
> _______________________________________________
> 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