Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1042
  • Last Modified:

.htaccess Ignore errordocument Redirects in cgi-bin

I have the following code in my .htaccess file:

ErrorDocument 401 /404.htm
ErrorDocument 403 /404.htm
ErrorDocument 404 /404.htm
ErrorDocument 500 /404.htm

I would like those error redirects ignored in my cgi-bin so that if I have CGI it won't redirect to an error page. How can I do this?
0
webstuck5
Asked:
webstuck5
  • 2
1 Solution
 
ahoffmannCommented:
what should happen for those 40x errors?
what should your webserver return for 500?
0
 
webstuck5Author Commented:
If I have a CGI script error then I don't want the page to redirect. I want the cgi-bin to ignore the errordocument redirects.
0
 
ahoffmannCommented:
if your cgi returns an error (anything different from 0) the server returns 500 unless configured otherwise the ErrorDocument just contains the response body, the status will be 500
0

Featured Post

Get quick recovery of individual SharePoint items

Free tool – Veeam Explorer for Microsoft SharePoint, enables fast, easy restores of SharePoint sites, documents, libraries and lists — all with no agents to manage and no additional licenses to buy.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now