Thursday, October 31, 2013

relative URLs in redirects


If I return an HttpRedirect() with a relative URL in it, I notice that Django fully qualifies the redirect with a hostname and scheme.


Location /foo/bar/

goes to


Is there a reason to fully qualify like this? I've found relative URLs much more portable in the past, and they work through proxies, make no assumptions about SSL on or off, etc.


You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
To post to this group, send email to
Visit this group at
To view this discussion on the web visit
For more options, visit

No comments:

Post a Comment