Just to conclude this post. I was following a guide: http://www.redrobotstudios.com/blog/2009/02/18/securing-django-with-ssl/
After a long day. Concequently the nginx.conf had a rewrite rule(below) which passed to the url dispatcher... which got a view with a decorator which rewrote the header. Then the nginx.conf rewrote it again thus infinite redirect loop. Concequently i decided to just use the nginx.conf rewrite rule to put the admin and payment url's/sub-url's into HTTPS: location ~ ^/payments/(.*)$ { rewrite (.*) https://www.mydomainname.com/$1 permanent; } location ~ ^/admin/(.*)$ { rewrite (.*) https://www.mydomainname.com/$1 permanent; } So now the site works, transitions between HTTP and HTTPS easily without needing to code for it using a decorator (or similar) in django. Problem solved. On Fri, Jul 2, 2010 at 12:48 PM, Sam Walters <mr.sam...@gmail.com> wrote: > Hi Django Users > > I have been looking to make some of my views secured by SSL, i have > made a certificate for testing. > > For the views which require https i rewrite the url and redirect using > a decorator. > In theory this should redirect and nginx will server the views through https. > > Instead what i find is the "The page isn't redirecting properly" > Looking at firebug its looping over and over again with a GET request > to https://url.com/payments/ > > Which seems to indicate the nging.conf entry for my /payments/ > location is not configured correctly. > > Im new to the https stuff so if anyone could take a look and give me > tips it would be greatly appreciated. > > http://pastebin.com/Jauysm9C > > cheers > > sam_w > -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.