[mod_python] How can I have sensible URLs?

Adrien Plisson rien at yeepa.org
Wed Sep 4 12:01:25 EST 2002


From: "Peter Bittner" <peter.bittner at gmx.net>
> Apache's module mod_rewrite might be some kind of workaround to this. But
is
> this really satisfying? How do other programmers feel about this?

i used mod_rewrite for almost the same purpose.
i took me some times (counting in minutes) to figure out how to write the
regular expression which rewrite the URL. but if you always use the same
name for the default method and *every* files are python script, then one
rule is sufficient for the whole server. for more complex cases, take the
time to know exactly in which case you need a rewrite, and there will always
be a regular expression matching your need.
in my case, i ended up with 5 rules for the whole server -> 5 different
cases which could happen when a request is coming in.

mod_rewrite is flexible (due to the use of regexp), easy to understand, and
incredibly powerful : it allows you to do everything you want when dealing
with url problems. try it and you will like it.

--
rien




More information about the Mod_python mailing list