Страница 1 из 1

nginx + error_page + HTTP_REFERER

Добавлено: 2013-07-02 16:16:19
icb
Хочу сделать универсальную страничку с ошибкой 404.
Назначаю ее для всего сервера:

Код: Выделить всё

error_page 404 http://example.com/error.php;
Смотрю браузером: редирект происходит.
Но error.php не видит HTTP_REFERER и в REDIRECT_STATUS находится код 200.
Разве так и должно быть?

Может есть другой способ красивого задания странички 404 для всего сервера?

Re: nginx + error_page + HTTP_REFERER

Добавлено: 2014-03-22 12:47:54
Alex Keda

Код: Выделить всё

srv0# cat /usr/local/etc/apache22/Includes/httpd-errors.conf
#
# Customizable error responses come in three flavors:
# 1) plain text 2) local redirects 3) external redirects
#
# Some examples:
#ErrorDocument 500 "The server made a boo boo."
# uncommented by lissyara 2009-06-06 in 23:34 MSK
# modifyed by lissyara 2010-0715 in 20:17MSK
#MD5 ("host-food.ru") = 963ae7870bf7a8d3d2242b10e6aee32b

Alias           /963ae7870bf7a8d3d2242b10e6aee32b/      /usr/local/ispmgr/www/disabled/

ErrorDocument   206     /963ae7870bf7a8d3d2242b10e6aee32b/206.html
ErrorDocument   400     /963ae7870bf7a8d3d2242b10e6aee32b/400.html
ErrorDocument   401     /963ae7870bf7a8d3d2242b10e6aee32b/401.html
ErrorDocument   403     /963ae7870bf7a8d3d2242b10e6aee32b/403.html
ErrorDocument   404     /963ae7870bf7a8d3d2242b10e6aee32b/404.html
ErrorDocument   405     /963ae7870bf7a8d3d2242b10e6aee32b/405.html
ErrorDocument   408     /963ae7870bf7a8d3d2242b10e6aee32b/408.html
#ErrorDocument  499     /963ae7870bf7a8d3d2242b10e6aee32b/499.html
ErrorDocument   500     /963ae7870bf7a8d3d2242b10e6aee32b/500.html
ErrorDocument   502     /963ae7870bf7a8d3d2242b10e6aee32b/502.html
ErrorDocument   503     /963ae7870bf7a8d3d2242b10e6aee32b/503.html
ErrorDocument   504     /963ae7870bf7a8d3d2242b10e6aee32b/504.html

#ErrorDocument 404 "/cgi-bin/missing_handler.pl"
#ErrorDocument 402 http://www.example.com/subscription_info.html
#