#!/bin/bash
if [ -z "$REDIRECT_STATUS" ]; then
  echo -e "Content-Type: text/html\r\n\r
<b>Security Alert!</b> The Perl CGI cannot be accessed directly.

<p>This Perl CGI launcher is configured to require a redirect.  This
means that a page will only be served up if the REDIRECT_STATUS CGI variable 
is set, e.g. via an Apache Action directive.</p>

<p>For more information as to <i>why</i> this behaviour exists, see the <a href=\"http://php.net/security.cgi-bin\"> PHP manual page for CGI security</a>.</p>
"
else
  export SCRIPT_NAME=${PATH_TRANSLATED##${DOCUMENT_ROOT}}
  export SCRIPT_FILENAME=$PATH_TRANSLATED
  /usr/bin/perl "$SCRIPT_FILENAME"
fi

