Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

.htaccess Ignore errordocument Redirects in cgi-bin

Posted on 2012-03-20
3
Medium Priority
?
1,023 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If you are a web developer, you would be aware of the <iframe> tag in HTML. The <iframe> stands for inline frame and is used to embed another document within the current HTML document. The embedded document could be even another website.
A quick Powershell script I wrote to find old program installations and check versions of a specific file across the network.
Learn the basics of if, else, and elif statements in Python 2.7. Use "if" statements to test a specified condition.: The structure of an if statement is as follows: (CODE) Use "else" statements to allow the execution of an alternative, if the …
In this fifth video of the Xpdf series, we discuss and demonstrate the PDFdetach utility, which is able to list and, more importantly, extract attachments that are embedded in PDF files. It does this via a command line interface, making it suitable …
Suggested Courses

610 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