Answer the question
In order to leave comments, you need to log in
Nginx, how to serve another page without a redirect?
For the 10.0.0.0/8 network, you need to give the regular index.html, and for other networks, index-inet.html
How to do this _without_ a redirect? For the server to stupidly give content from another file to other networks?
I did it, but there is an explicit redirect, it does not suit me:
location / {
if ($remote_addr !~ "^10\.") {
rewrite ^/$ $scheme://$http_host/index-inet.html last;
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question