(However if you are using embedded CSS within the <head> tag then you can reuse a CSS file in cgi-bin by using the FileOut() call.)
If using regular CSS files not embedded in head, then you can organize like:
http://yoursite.com/cgi-bin/prog/prog.cgi http://yoursite.com/css/prog/prog.cssRather than below, which will not work in general:
http://yoursite.com/cgi-bin/prog/prog.cgi http://yoursite.com/cgi-bin/prog/prog.cssThis is because cgi-bin is not for storing static CSS files or javascript .js files, unless you embed them in the output of the program with FileOut.
Cgi-bin cannot contain static css/java files that the client web browser would try to access as static files.
You could also organize your files like this:
http://yoursite.com/cgi-bin/prog/prog.cgi http://yoursite.com/cgi-files/prog/prog.cssThere are many ways to do it.
As a side note: with interpretted PHP where files can be located anywhere, it is less secure than cgi-bin since people can find include files that you wouldn't necessarily want them to find.. so CGI isn't all that bad for being restrictive.. it has benefits. Your text files in cgi-bin that store data are hidden, such as SDS files and other config files.
A server with unrestricted cgi-bin that allows html to be accessed anywhere, or cgi programs to be executed in any folder.. is less secure since people can view files that the cgi program rely on (if you didn't take precaution to secure them through htaccess). Therefore it is recommended you work with a server with restricted cgi-bin anyway.