Redirecting to https

Okay, maybe I have a cold coming on…but I’ve got a couple of URLs I
need to redirect to https and the examples I’ve seen don’t appear to be
working:

location /asecuredir {
rewrite ^(.*) https://www.example.com$1 redirect;
}

I’ve tried /asecuredir and /asecuredir/

It appears to redirect to https if I enter
http://www.example.com/asecuredir but doesn’t redirect if I use
http://www.example.com/asecuredir/somepage.shtml

Thanks.

On Sat, Mar 22, 2008 at 08:49:12PM -0400, Ian M. Evans wrote:

It appears to redirect to https if I enter
http://www.example.com/asecuredir but doesn’t redirect if I use
http://www.example.com/asecuredir/somepage.shtml

Probably, /asecuredir/somepage.shtml is handled by some regex location.
Try to disable regex search:

location ^~ /asecuredir {

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs