A
A
Alexey Lebedev2017-03-01 19:53:36
Nginx
Alexey Lebedev, 2017-03-01 19:53:36

How to change the returned header in nginx?

Status Code: 301 Moved Permanently
Remote Address: xxxx:80
Request URL: http://xxxx/link1/link2
Location: http://yyyy/link1/link2/

We have such a situation. IIS returns like this if the link is without a slash.
Those. test.com/aaa => test.com/aaa
As far as I know, removing this without perversions will not work.
Therefore, one of 2 options is suitable:
1) replacing the redirect address in nginx
2) if such a redirect occurs, then we return a 404 error. We
are interested in the most optimized option

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question