Redirect rules

Redirect rules in Nginx

Use the following to redirect to https on nginx.

server {
listen 80;
server_name my-domain.com;
return 301 https://$server_name$request_uri;
}

Related Articles

Leave a Comment