Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Running CGI-Script from outside CGI-BIN?

From: gjones05:mail:orion at: 7-Feb-2001 13:28

Hi, Douglas, Assuming that your site is running on Apache, Tim Perdue explained how to accomplish this task in PHP at the website: http://www.phpbuilder.com/ The specific link to his follow-up article that gave more details is: http://www.phpbuilder.com/columns/tim20000526.php3 He used this method to build the website www.gotocity.com . For REBOL, put the following in the httpd.conf file (or in the .htaccess for the directory, if you don't have access to the httpd.conf file): <Location /local> ForceType application/x-httpd-r </Location> This tells Apache to run files in the directory as scripts. I put it after the following line: # End of browser customization directives In my test case, I added index.r as another default, as such: # DirectoryIndex: Name of the file or files to use as a pre-written HTML # directory index. Separate multiple entries with spaces. # <IfModule mod_dir.c> DirectoryIndex index.html index.shtml index.php index.r </IfModule> Then in the path, put a file named index.r that basically runs code based on supplied parameters. Be sure that this file includes the path to the rebol interpreter with the #!, as usual, as the first line of the script. The parameters can be supplied as part of the path, if you wish, like Tim did. So calling http://www.mywebsite.dom/local/arg1/arg2 will run the file /local/index.r, and this script can parse the "path" for the arguments. But, as always, be extremely careful about what is being passed to the script interpreter. On my test set-up, it worked "like a charm!" Slick stuff. Hope that this helps. --Scott Douglas Vos wrote: