Solved

.htaccess Ignore errordocument Redirects in cgi-bin

Posted on 2012-03-20
3
988 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 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

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

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

Hi, in this article I'm going to teach you how to run your own site, and how to let people in (without IP). I'll talk about and explain each step... :) By the way, everything in this Tutorial is completely free and legal. This article is for …
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
Learn how to match and substitute tagged data using PHP regular expressions. Demonstrated on Windows 7, but also applies to other operating systems. Demonstrated technique applies to PHP (all versions) and Firefox, but very similar techniques will w…
In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

733 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