[mod_python] How can I have sensible URLs?

Gregory (Grisha) Trubetskoy grisha at modpython.org
Tue Sep 3 13:03:37 EST 2002


Basically, the publisher doesn't have a "default" method name. (There is
no particular reason for this, it just didn't occur to me at the time of
writing.)

There is probably more than one way to accomplish something to that
extent, one way would be to try a redirect, something like:

Redirect /index.py http://www.mydomain.com/index.py/index

Grisha

On Tue, 3 Sep 2002, Peter Bittner wrote:

> Hi there!
>
> I have a little bit of understand problem of how the architecture of a
> mod_python web application (say web site, if you want) should be.
>
> I would like to have the URLs as if the mod_python scripts were simply some
> kind of "special HTML documents", comparable to PHP scripts.
>
> For example, I have written a script named "index.py" which is located on my
> document root. So I would expect "http://www.mydomain.com/index.py" to
> execute my script (I have set up my Apache so that I can omit the filename, too).
> But it doesn't. When I remove the ".py" at the end there is no change to this
> too.
>
> So what I have to do is to execute "http://www.mydomain.com/index/method",
> provided a method called "method" in my script. This way it works. - But is
> there a way to have "HTML-like" or "PHP-like" behavior? Or how do I have to
> organize my scripts so that I can have my whole website written in mod_python
> and can run it with "http://www.mydomain.com" alone?
>
> Does anyone have a good example about how to do this?
>
> Thanks in advance!
> Peter
>
> --
> Peter Bittner
> mobil: +43/(0)650/4151545
> web: http://www.bittner.at.tf - http://beam.to/htmlkurs
> mail: peter.bittner at gmx.net
>
> "Free software is like free speech, not free beer" (Richard Stallman)
>
> GMX - Die Kommunikationsplattform im Internet.
> http://www.gmx.net
>
> _______________________________________________
> 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