nginx - redirect to external address for not found pages

nginx - redirect to external address for not found pages

In /etc/nginx/sites-available/[server_name_here] add lines as follows:

...
location / {
	try_files $uri $uri/ @redirect;
}
...
location @redirect {
	rewrite ^ [your_link_here];
}

And restart nginx.

P.S. Dots (...) means another content of your nginx-site file