Solved

.htaccess Ignore errordocument Redirects in cgi-bin

Posted on 2012-03-20
3
973 Views
Last Modified: 2013-12-25
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
Comment
Question by:webstuck5
  • 2
3 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 37750179
what should happen for those 40x errors?
what should your webserver return for 500?
0
 

Author Comment

by:webstuck5
ID: 37750262
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
 
LVL 51

Accepted Solution

by:
ahoffmann earned 500 total points
ID: 37750304
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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

A year or so back I was asked to have a play with MongoDB; within half an hour I had downloaded (http://www.mongodb.org/downloads),  installed and started the daemon, and had a console window open. After an hour or two of playing at the command …
In the distant past (last year) I hacked together a little toy that would allow a couple of Manager types to query, preview, and extract data from a number of MongoDB instances, to their tool of choice: Excel (http://dilbert.com/strips/comic/2007-08…
The viewer will learn how to count occurrences of each item in an array.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…

758 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now