Hello everyone!
Just registered to
pylonshq.com in order to report this "bug". First
of all, congrats all the developers for the very nice framework.
Second, not sure where to report this bug (Pylons, Routes or WSGI), so
please bear with me: just trying to help out.
After much investigation, here at work we have realised that, when you
have the following combo:
- A Pylons application named, say "myapp"
- A virtualhost under Apache 2 with "ServerName myapp" (static route
in /etc/hosts of the client PC, as usual)
- A WSGIScriptAlias directive in that virtualhost set to the root of
the application, such as "WSGIScriptAlias / /mydir/myapp/myapp.wsgi"
When you request a URL such as
http://myapp/controller/action/id?param=value
You get a 301 redirection to
http://myapp/controller/action/id//?param=value
But if you set up the WSGIScriptAlias such as "WSGIScriptAlias /
whatever /mydir/myapp/myapp.wsgi"
And then you request
http://myapp/whatever/controller/action/id?param=value,
it works fine.
I finally realised that the hostname being equal to the application
name might be the problem, and changed the hostname to
myapp.mydomain.com and everything started working fine with
"WSGIScriptAlias / /mydir/myapp/myapp.wsgi".
So not sure whether this has to do with mod_wsgi, Pylons or Routes,
but I hope some else can tell. I'll try to report this bug to the
Pylons mailing list.
Thanks in advance.
P.S. I have reported this bug to the WSGI mailing list at Google
Groups, too.