Answer the question
In order to leave comments, you need to log in
How to make a correct redirect to nginx?
There is the following file structure:
mysite.com/pages/en.html
mysite.com/pages/ru.html
How can I make these pages appear when accessing the URL:
mysite.com/en/
mysite.com/ru/
?
But at the same time, the old paths should be inaccessible
mysite.com/pages/en.html - 404 Not found
Standard config:
location / {
try_files $uri $uri/ =404;
}
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