Volodya
volodya at real.samuraj.org
Wed May 19 22:40:26 EDT 2004
On Wed, May 19, 2004 at 06:12:23PM +0100, Terry MacDonald wrote: > Some good questions especially... > > 3. With publisher, is it possible to hide the ".py" suffix? > > I've been trying for an answer to that for a while. The suggestion is > that one uses SetHandler but I'll be %^&(* if I can get it to work > properly. AddHandler (with Directorys) works fine. > > If anyone out there is using the publisher handler and SetHandler to > avoid having .py extensions and it works! could they publish the > pertinent configuration data please (pretty please!). I tend not to use > .htaccess files and prefer the main config file for setting these things > up - if that helps. > > Just write your publisher's code into index.py file. For example , if we have /var/www/test/index.py (where /var/www/ is the httpd's document root), than we can use: http://SERVER/test/ (calls index function in index.py) http://SERVER/test/hello (calls hello function in index.py) http://SERVER/test/?id=555 (calls index function with id paramater set to 555) Set these options for test subdirectory (as for me, i prefer .htaccess): SetHandler mod_python PythonHandler mod_python.publisher
|