Example: Say I have a script called view-source. If I then add an HREF in a document to http://myserver/htbin/view-source/dir1/dir2/source.c, /htbin/view-source will be called with the extra information as defined below. In this case, the extra information is /dir1/dir2/source.c. NOTE: A script such as view-source is inherently dangerous, because it allows users to see your entire system. A proper script would translate the name into something else.
You have gotten no search arguments and your script has been accessed by its real name. You have therefore recieved NO information in argv[]. This case is useful for printing the default page, or the page which has <ISINDEX> on it for the clients.
You have two possibilities. One, you have been accessed by your name followed by path information and sent no query information. Two, you have been accessed by your real name and have gotten query information. In this case, argv[1] is either of these.
You have been accessed by your name followed by path information, and you have been sent search information. In this case, argv[1] will be the path information, and argv[2] will be the search information.
Move on to decoding your arguments
httpd@ncsa.uiuc.edu