On Sep 29, 2006, at 1:25 PM, Sergey Lipnevich wrote:
> > Hi, > > I noticed that when doing redirect_to(controller = 'this'), Routes > will redirect to the url of this controller without regard for > application root. So, if application is deployed at /myapp, redirect > would send a user to /this rather then /myapp/this. Is this expected > behavior or a bug? > All of pylons' url generation functions will prefix urls with your app's SCRIPT_NAME (found in the environ dict). Your app does not have SCRIPT_NAME setup correctly for where it's deployed. This is a common issue for apps deployed behind a reverse proxy -- in that case, you'll want to use PrefixMiddleware to force the SCRIPT_NAME value. See: http://pylonshq.com/docs/0.9.2/ application_configuration.html#prefixmiddleware > Maybe in this case redirect shouldn't be used at all? Should I simply > call this other controller's method instead of redirecting? > Thanks! > -- Philip Jenvey --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/pylons-discuss -~----------~----~----~----~------~----~------~--~---
