Archive for the tag 'any'

SBDavid

Running CGI script from any directory

Running CGI script from any directory

In order to force apache to allow cgi script to run, simply create a file called .htaccess inside the directory in which you wish to run the scripts. Inser this text into the file:

AddHandler cgi-script .cgi .pl

AddHandler maps the filename extensions extension to the handler handler-name. This mapping is added to any already in force, overriding any mappings that already exist for the same extension. For example, to activate CGI scripts with the file extension “.cgi”, you might use:

AddHandler cgi-script .cgi

Once that has been put into your srm.conf or httpd.conf file, any file containing the “.cgi” extension will be treated as a CGI program.

The extension argument is case-insensitive, and can be specified with or without a leading dot.