Answer the question
In order to leave comments, you need to log in
How to not display an Nginx error_page error page on a specific url?
The domain behind cloudflare, if there is an error on the server, it will show a stub with an error code from Cloudflare, but I need to show my page, so I solved the issue with the nginx rule Below.
error_page 500 501 502 503 504 505 =200 /50x.html;
location = /50x.html {
root /etc/nginx;
}
Answer the question
In order to leave comments, you need to log in
Write a separate location for this address:
location =/wp-admin/ {
// here we write what needs to be done, for example, display our own error page instead of nginx's
error_page 500 501 502 503 504 505 /my_error_page.html;
// or redirect the user somewhere far away
return 301 4xpro.ru ;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question