Making a CGI Script Interpret all files ending in .xxx
I have created a CGI script in C that outputs to stdout a simple hello
world. What I want to setup is that every file ending in .xxx (for example
.html) is interpreted by my CGI script written in C. I am using apache.
I have done the following to add a handler for all files ending in .html
however when I accessed index.html it did not display hello world, and
hence was not passed to my CGI script. How would I set this up? I have
done the following with no luck:
Options ExecCGI
AddHandler myinterpreter .html
Action myinterpreter /cgi-bin/cgi-script
... where cgi-script is the name of my program that I can access via URL
(localhost/cgi-bin/cgi-script) and display the right output.
In the long run my goal is to develop a basic interpreter for learning
purposes of course, for now I want to set it all up with a "hello world".
No comments:
Post a Comment