Skip to content

Nginx rewrite to external url

rewrite ^ https://www.domain2.nl/ permanent;


server {
    listen   80;
    server_name  www.domain1.nl;  # Domain you want to redirect from
    server_tokens off;
    location / {
        rewrite ^ https://www.domain2.nl/ permanent; # Domain you want to redirect to
    }
}

Published inCode