I'm trying to show 404 error instead of 403 and I have been able to do that with the following line:
ErrorDocument 403 /404.html
but it wasn't applied to /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.
Thank you and I apologize for any inconvenience.
Try to add the lines below to your cgi script configuration:
RewriteCond !%{ENV:REDIRECT_STATUS} "=403"
RewriteRule (.*) /path/to/404.html [L]
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.