S
S
Suffering0072016-12-06 13:30:02
Nginx
Suffering007, 2016-12-06 13:30:02

Why is Nginx giving a 302 response instead of a 404?

When going to a non-existent page, the status 302 is returned instead of 404. What could be the problem? There is no "return 302" anywhere in the config. The Location field contains the same url to which the transition was made. Browser, when going to a page that doesn't exist, says
"The example.ru page isn't working
example.ru redirected you too many times.
Try clearing your cookies.
ERR_TOO_MANY_REDIRECTS"

Answer the question

In order to leave comments, you need to log in

1 answer(s)
Алексей Сундуков, 2016-12-06
@Suffering007

Какой-то из rewrite правил в конфиге создает зацикленный редирект.
Если отдает 302 значит так настроено (либо 302 отдает бэкэнд). Поэтому внимательно смотрите конфиг.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question