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
>
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
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