[mod_python] how do I eliminate the .py extension in url?

Jef Dodson jefdodson at yahoo.com
Thu Feb 10 21:26:27 EST 2005


Turning off MultiViews in my apache config file worked beautifully.  Thanks very much to everyone
who responded with ideas!

Jef



> Jef Dodson wrote ..
> > Also, it's not a very general solution.  I would like to be able to access
> > any number of scripts
> > without having the .py show up in the URL.  I am sure it is possible because
> > I had it working
> > under Linux, but I am now trying to get it working under BSD so I'm wondering
> > if maybe there is
> > some option that I'm missing in my httpd config file that was there by
> > default on the Linux
> > installation.  Anyone have any ideas on this?
> 
> Make sure you turn off MultiViews. Add to your .htaccess file:
> 
>   Options -MultiViews
> 
> Alternatively, don't set it in the first place in the main Apache configuration
> for that directory. Turning this off in a .htaccess file will require you to have
> appropriate rights to do so.
> 
> You should then be able to avoid using a .py extension if configuring use of
> publisher as:
> 
>   SetHandler python-program
> 
> This cannot be done if you used:
> 
>   AddHandler python-program .py
> 
> The MultiViews option can cause lots of problems when using mod_python and
> is frankly better always turned off.
> 
> Graham
> 



		
__________________________________ 
Do you Yahoo!? 
The all-new My Yahoo! - Get yours free! 
http://my.yahoo.com 
 



More information about the Mod_python mailing list