Hello! I'm trying to 1. send people to home page if they enter wrong place (404) 2. it works, but HTML content with headers is:
HTTP/1.1 302 Moved Temporarily Server: nginx/1.10.3 Date: Thu, 23 Mar 2017 11:38:08 GMT Content-Type: text/html Content-Length: 161 Location: http://mysite/myhomepage.html Connection: keep-alive <html> <head><title>302 Found</title></head> <body bgcolor="white"> <center><h1>302 Found</h1></center> <hr><center>nginx/1.10.3</center> </body> </html> Is it possible to send custom page content? My config: server { listen 80; root /somewhere/mysite; location @redirect_to_home { error_page 302 /custom_302_page.html; return 302 /myhomepage.html; } error_page 404 = @redirect_to_home; } Thanks for the advise!
_______________________________________________ nginx mailing list nginx@nginx.org http://mailman.nginx.org/mailman/listinfo/nginx