Since Red ( http://red-lang.org/ ) supports functions and becomes more and more mature almost per day, it is also possible to do a little CGI scripting.
This is a small tutorial of how this can be done.
Beacuse Red can be cross-compiled from any machine that has a working REBOL core version to any of the targets supported, chances are you can do this too.
I will not go into a lengthy explanation of how to install the correct REBOL program in the Red directory, nor will I tell you here how to use the redcompiler.r REBOL script on REBOL/View because you can find those elsewhere.
First you create a script that later needs to be compiled:
Red [ "My First Red CGI testscript"
print "Content-Type: text/html^/" ;-- Required Page Header
code: "<h2>Welcome Red CGI!!</h2> The world has been waiting for you!</body></html>"
html: append html code
After this you will need to cross-compile your script to create a Linux executable.
You then have change the file extension to .cgi.
Upload the script to your (Apache) server and be sure to give it executable rights.
Probably that is all and you can test your script in the browser.
If you still encounter problems, the reason may lie in your .htaccess file on the server or in the directory above your script.
This has to contain a line that says
You can find more information on Red on http://red-lang.org/ and your version of REBOL to use on
http://rebol.com/ and the REBOL script to help you compile your Red CGI scripts here http://www.rebol.org/view-script.r?script=redcompiler.r
Good luck and very much fun creating your Red CGI scripts!!