[英]Disable direct access to nginx custom error page
I have this nginx block that redirects all 401,403 and 404 to a single custom error page我有这个 nginx 块将所有 401,403 和 404 重定向到单个自定义错误页面
error_page 401 @errorPage;
error_page 403 @errorPage;
error_page 404 @errorPage;
location @errorPage {
rewrite ^ /error.php?error=$status last;
}
Is it possible to deny the access to the error.php if called directly?如果直接调用,是否可以拒绝访问error.php? Thanks
谢谢
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.