Have full URL redirect to SSL (not just $server_name and $request_uri)

Edho Arief me at myconan.net
Wed Nov 19 14:38:11 UTC 2014


On Wed, Nov 19, 2014 at 11:22 PM, biot023 <nginx-forum at nginx.us> wrote:
> Ah, will do, cheers -- I had a look through the NGINX variables, but it
> wasn't really clear which variable did what.
> I suppose something like:
>
> location / {
>   return 301 https://$uri;
> }
>
> Wouldn't work?
>

generic redirect looks like this

return 301 https://$host$request_uri;



More information about the nginx mailing list