[英]Show 404 instead of 403
I'm trying to show 404 error instead of 403 and I have been able to do that with the following line: 我试图显示404错误而不是403错误,并且已经能够通过以下代码做到这一点:
ErrorDocument 403 /404.html
but it wasn't applied to /cgi-bin 但不适用于/ cgi-bin
Please guide me to the reason that it is not applied on cgi-bin and how to show 404 instead of 403 for this path. 请指导我为什么它不适用于cgi-bin以及该路径如何显示404而不是403的原因。
Thank you and I apologize for any inconvenience. 谢谢您,不便之处,敬请原谅。
Try to add the lines below to your cgi script configuration: 尝试将以下几行添加到您的cgi脚本配置中:
RewriteCond !%{ENV:REDIRECT_STATUS} "=403"
RewriteRule (.*) /path/to/404.html [L]
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.