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

[REBOL] Re: webserver.r

From: ptretter:charter at: 15-Jul-2001 7:31

I seem to have found the issue. Cal recently sent me the latest version of his webserv.r script. I got it to work but had to modify the following code to match this (see comment I added below): --------- snip --------------- translate-request-to-resource: func [ file /local file-path ] [ if (last file) = #"/" [ append file "index.html" ] file-path: clean-path join wwwpath to-file next file if none? find file-path clean-path wwwpath [ file-path: clean-path join wwwpath "index.html" ] if dir? file-path [ append file-path "index.html" ] ; Cal had /index.html before. I removed the "/" Seems to have fixed it with my browser IE 5. return file-path ] ---------------------------------- The IE5 browser automatically adds the trailing slash, which appears to be the culprit. I believe the script was fine as I don't believe the Internet Explorer browsers always did this until more recent versions. I got this to work for me as I only intent to run a webserv for my own purposes and own access - so this may not be a real solution if other browsers are utilized. Cal script if very nice. Thanks Cal. Paul Tretter