Answer the question
In order to leave comments, you need to log in
How to disable URL autocorrection in Nginx?
In general, the situation is this, there are folders to which I closed access through Nginx, but one cant surfaced. For example, there is an admin folder, Nginx has a directive that prohibits entering the folder and displays 404, as if it does not exist, when you type site.ru/admin, since this folder exists, Nginx adds a slash at the end, and only then displays 404.
Perhaps but is it possible to disable this autocorrect so that the URL is exactly as it was written? Thanks for any info or answer!
Answer the question
In order to leave comments, you need to log in
location = /admin {
return 404;
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question