I have written a C CGI executable, and I want it to be able to retrieve the PATH_INFO from Apache. For example, if I have the compiled C file as /var/www/html/file, and I request http://localhost/file/pathinfo, How do I get the pathinfo portion?
If you have any idea, please help. Thanks in advance!
This (and a great deal of other information) is available as environment variables. This shell script, run as a CGI script in your environment, will dump everything you can get at:
From your C program, access the variables using
getenv()as usual.