htaccess Elite

.htaccess tutorial


All times are UTC [ DST ]





Post new topic Reply to topic  [ 1 post ] 
Author Message
 Post subject: Processing all GIF images through a CGI script
PostPosted: 24 Oct 2006 17:25 
Offline
User avatar

Joined: 25 Sep 2006 04:48
Posts: 242
# Processing all GIF images through a CGI script
# before serving them
Action image/gif /cgi-bin/filter.cgi
# Associating specific HTTP methods with a CGI
# script
Script PUT /cgi-bin/upload.cgi


In addition to the directives mentioned in the previous section, Apache provides directives that simplify associating specific MIME types, file extensions, or even specific HTTP methods with a particular CGI. The mod_actions module, included in the base distribution and compiled by default, provides the Action and Script directives, shown in this example:

The Action directive accepts two arguments. The first argument is a handler or a MIME content type; the second points to the CGI program to handle the request.

The Script directive associates certain HTTP request methods with a CGI program.

The information about the original requested document is passed to the CGI via the PATH_INFO (document URL) and PATH_TRANSLATED (document path) environment variables.

As with the example from the previous section, the directory containing the destination CGI must be marked as allowing CGI execution with either a ScriptAlias directive or the ExecCGI parameter to the Options directive.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC [ DST ]


Who is online

Users browsing this forum: Google [Bot] and 9 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Powered by phpBB