Nginx: Redirect 404s to custom 404 error page

Wrong:

error_page 404 =/404.html;

Above setting will return a 302 code to browser and search spider which is wrong.

Right setting:

error_page 404 /404.html;

Leave a Reply

Your email address will not be published.