With Apache we've sometimes made use of the 410 GONE http status code to indicate that resources have gone away to crawlers etc alongside an html page for human visitors.
We've either used something like:
ErrorDocument 410 ourmovedpage.html
...
Redirect gone /GONECONTENT
And the server provides the 410 status code along with showing browser visitors the 'ourmovedpage' address.
With Nginx, I've tried
location = /gonecontent-address {
error_page 404 =410 $scheme://ourdomain/ourmovedpage.html;
}
but in testing that Chrome seemed to be displaying a 302 redirect status code, instead of the 410 I'm after.
Has anyone come up with something similar for Nginx to send a 410 but also return a nice page for human visitors?