Re: stripping the cgi part in h.url_for and others helpers

2007-07-23 Thread Philip Jenvey
On Jul 22, 2007, at 1:44 PM, Walter Cruz wrote: > > Routes uses environ['SCRIPT_NAME']. So, when I generate a url with > h.url*, it brings me the dispatch.cgi part. > > I changed that with a middleware: > > class CleanMiddleware(object): > def __init__(self, app): > self.app = app >

Re: stripping the cgi part in h.url_for and others helpers

2007-07-22 Thread Walter Cruz
I will answer myself :) I'm using thie .htaccess: RewriteCond %{REQUEST_FILENAME} !-f RewriteRule ^(.*)$ dispatch.cgi/$1 [QSA,L] This redirects all the requests to files that don't exists to dispatch.cgi (pylons). Routes uses environ['SCRIPT_NAME']. So, when I generate a url with h.url*, it b

stripping the cgi part in h.url_for and others helpers

2007-07-20 Thread Walter Cruz
Hi. I'm testing a Pylons app throug cgi. I have configured clean urls through .htaccess.. In the example above: h.url_for(controller='manage',action='edit',id=pagina.id) It generates a link as : http://localhost/artigos/roda.cgi/manage/edit/11 But I want to strip the roda.cgi! If I access