Sunday, June 29, 2008

execute cgi script out of cgi-bin directory

The apache treat cgi scripts as stated in httpd.conf in ScriptAlias directory i.e. cgi-bin. To execute cgi script outside cgi-bin just adds following 2 lines in .htaccess files to execute cgi scripts in any folder outside cgi-bin.

Code:
--------------------------------------------------
AddHandler cgi-script .pl .cgi
Options Includes ExecCGI
--------------------------------------------------

No comments: