Home>Article>Operation and Maintenance> How does Nginx realize 404 automatically jump to the home page?
404 automatically jumps to the homepage
server { location / { error_page 404 = @ops-coffee; } location @ops-coffee { rewrite .* / permanent; } }
The 404 page on the website is not particularly friendly. We can use the configuration above to automatically jump to the homepage after the 404 appears.
The above is the detailed content of How does Nginx realize 404 automatically jump to the home page?. For more information, please follow other related articles on the PHP Chinese website!