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

Gregory (Grisha) Trubetskoy grisha at modpython.org
Thu Feb 10 19:54:47 EST 2005


You're not missing anything as far as I can tell, you shouldn't need the 
.py with the config below.

What happens when you go to /scripts/my_script/my_handler ? (Probably a 
better name for this URL would be /scripts/my_script/my_function since 
your handler in this case is mod_python.publisher).

Grisha

On Thu, 10 Feb 2005, Jef Dodson wrote:

> I'm having a problem getting mod_python to work with url's that don't include the .py extension.
> Here's what I would like to do:  I would like to keep the .py extension on my files, but not
> include them in the url.  So, if I have my_script.py in my scripts directory, I would like to be
> able to reference that function in the url as /scripts/my_script/my_handler, i.e., no my_script.py
> in the url.  Here is the relevant section from my apache config file:
>
> <Directory /var/www/my_site.com/scripts>
>    SetHandler mod_python
>    PythonHandler mod_python.publisher
>    PythonDebug On
> </Directory>
>
> Is there something else that I need that I'm missing?  Thanks!
>
>
>
>
>
> __________________________________
> Do you Yahoo!?
> The all-new My Yahoo! - Get yours free!
> http://my.yahoo.com
>
>
> _______________________________________________
> Mod_python mailing list
> Mod_python at modpython.org
> http://mailman.modpython.org/mailman/listinfo/mod_python
>


More information about the Mod_python mailing list