durusmail: quixote-users: RewriteRule
RewriteRule
2002-05-21
2002-05-22
2002-05-22
2002-05-22
2002-05-22
2002-05-23
2002-05-24
2002-05-29
2002-05-29
2002-05-29
2002-05-29
2002-05-29
2002-05-29
2002-05-29
RewriteRule
Jonathan Corbet
2002-05-22
Just in case anybody's interested: I ended up setting up a server with no
rewrite rules at all.  I wanted to be able to run it as, say, plain
http://lwn.net and have it work right.  It took a bit of trickery of a
different kind.

Step one was, for the relevant virtual host:

        DocumentRoot .../www/lwn/lwn.py

That is, of course, the famous "driver script" - but it never gets run.
It's just a way of forcing the server to move down into the "lwn"
directory, where a special regime is in force:


        SetHandler python-program
        PythonHandler qlwn.publisher
        PythonOption quixote-root-namespace qlwn
        PythonOption quixote-config-file /h2/www/lwn/lwn.conf
        PythonDebug On
        [...and some other details...]


That causes my publisher to be executed for anything, including the
top-level directory.  Works pretty nicely.

Of course, Apache 2 probably has a more straightforward way of doing this.
Some day...

One of these days I plan to write up the full series of things I had to do
to make quixote work well with mod_python...

jon

Jonathan Corbet
Executive editor, LWN.net
corbet@lwn.net


reply