How does the server know that a CGI script is to be ececuted for renderin output ? Is it because of its location in the cgi/bin directory ? or is it because of the .cgi extension ?
We can change the default location of cgi scripts. So in case of different location of CGI script, how would the server know whether to execute the script or render it without execution ?
If its the extension that instructs the server to execute the ci script, then what happens if a cgi script has .pl extension. As cgi script can have any extension, in that case how wd the server know whether to execute the script or render it as is ?