Reputation: 71
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.
Upvotes: 0
Views: 195
Reputation: 18980
Try to add the lines below to your cgi script configuration:
RewriteCond !%{ENV:REDIRECT_STATUS} "=403"
RewriteRule (.*) /path/to/404.html [L]
Upvotes: 0