Friday, January 28, 2011

cgi script served as plain text when called from .htaccess

Hi all, I'm Running Apache 2.2 on the RackSpace CloudSites. I have a Perl CGI script that works fine if called directly via URL. I want to use the script as a custom ErrorDocument, but instead of being parsed and run it displays the text as plain text.

Here is my .htaccess file:
DirectoryIndex index.php index.html index.htm
Options +ExecCGI
ErrorDocument 404 /cgi/test.cgi

Any help wold be appreciated!

  • After working with CloudSites support: 1. I had my .htaccess in a directory which won't allow the running of cgi scripts, no matter what options you add. I had to move the .htaccess up one level and refer to a file in a child dir. 2. They said the popular way to do this now is to use PHP instead of CGI.

    From joatis

0 comments:

Post a Comment