Answer the question
In order to leave comments, you need to log in
How to make a redirect in nginx so that at the end of each link there is .html?
Good day to all!
Now all pages of the site are available at the following addresses
site.ru/6-klass
site.ru/6-klass
site.ru/6-klass/.html
site.ru/6-klass.html
site.ru/6-klass.htm
And in general, it is available at all addresses where there is at least something after the dot, for example like this:
site.ru/6-klass.asd
site.ru/6-klass.sadjsakljdksa
site.ru/6-klass/.sadjsakljdksa
How to do to redirect to addresses with .html at the end, or give 404 to all pages without .html
Thanks in advance!
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