Welcome! Log In Create A New Profile

Advanced

add header on custom error page

Sheng.Zheng
September 06, 2011 09:06PM
Hi,
i'm trying to add a 'X-ua-compatible' header on a custom 444 error
page like below. but this does not work. do you have any suggestions
on how to do this?

Any advise will be appreciated.

Thanks.



error_page 444 = @err_444;

location = /xxx {
return 444;
}

location ~ \.php$ {
try_files $uri =404;
fastcgi_pass unix:/var/run/php.sock;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include /etc/nginx/fastcgi_params;
}


location @err_444 {
add_header X-ua-compatible 'IE=EmulateIE8';
rewrite ^ /index.php?url=err/444?;
}


_______________________________________________
nginx mailing list
nginx@nginx.org
http://mailman.nginx.org/mailman/listinfo/nginx
Subject Author Posted

add header on custom error page

Sheng.Zheng September 06, 2011 09:06PM

Re: add header on custom error page

speedfirst September 06, 2011 10:07PM



Sorry, only registered users may post in this forum.

Click here to login

Online Users

Guests: 91
Record Number of Users: 6 on February 13, 2018
Record Number of Guests: 421 on December 02, 2018
Powered by nginx      Powered by FreeBSD      PHP Powered      Powered by MariaDB      ipv6 ready