I had someone post a link to a site I was statically hosting on their social media, with emoji arrows pointing towards it. on both sides. Of course this was interpreted as part of the url when clicking the link, and therefore “the sites down, can you fix it” it’s truly 2016.

This simple copy/paste snippet from every nginx/stackoverflow forum at least turned the 404 into a redirect to the home page.

error_page 404 = @foobar;

location @foobar {
  return 301 /;
}

Leave a Reply

Your email address will not be published. Required fields are marked *