View previous topic :: View next topic |
Author |
Message |
ehrichweiss -
Joined: 16 Dec 2004 Posts: 5
|
Posted: Mon Jan 17, 2005 4:05 am Post subject: ./ path and Rebol cgi |
|
|
Hi,
I'm using Rebol to preprocess some of my pages and my new html editor apparently uses "./" which works fine when I load the page directly but for some reason when the script gets ahold of it, it can no longer find "./images" but it finds "/images" just fine. Anyone have any ideas what might cause this or what remedies I might take to correct it? I have already put a processor that replaces the "./" with "/" but I'd like a less makeshift solution. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1295
|
|
Back to top |
|
|
ehrichweiss -
Joined: 16 Dec 2004 Posts: 5
|
Posted: Mon Jan 17, 2005 6:10 pm Post subject: Re: ./ path and Rebol cgi |
|
|
Not Ruby, Rebol. I don't know much, if anything, about Ruby yet but it will be next on my list.
My rebol script is in /cgi-bin and that SEEMS to be where it's looking for the images because when I put them there to test...they appeared. I unfortunately can't let my source out cause it's doing some proprietary work but here's the gist of it: all of my pages are controlled and fetched by my handler.cgi via something like http://www.mysite.com/cgi-bin/handler.cgi?filename=pagetofetch.html . The handler loads the file, looks for tags in the source and processes them if necessary then sends the data to the browser. Simple as that.
I wrote a quick fix in the preprocessor that searches the html for "./" references and replaces them with "/" which works but I'm trying to discover whether there's another way without having to piece it together like that. |
|
Back to top |
|
|
ehrichweiss -
Joined: 16 Dec 2004 Posts: 5
|
Posted: Mon Jan 17, 2005 6:12 pm Post subject: Re: ./ path and Rebol cgi |
|
|
P.S. Thanx for any help. I really appreciate it....and LOVE Abyss. |
|
Back to top |
|
|
admin Site Admin
Joined: 03 Mar 2002 Posts: 1295
|
Posted: Tue Jan 18, 2005 12:55 pm Post subject: Re: ./ path and Rebol cgi |
|
|
Sorry for the mistake, but the same information apply whether it is Ruby or Rebol.
Anyway, you said that if you put the images inside /cgi-bin they are displayed correctly. The idea would be to add an alias mapping the virtual path /cgi-bin/images to the real path of your /images directory. |
|
Back to top |
|
|
ehrichweiss -
Joined: 16 Dec 2004 Posts: 5
|
Posted: Tue Jan 18, 2005 6:25 pm Post subject: |
|
|
Worked like a charm!! Thanks a lot. |
|
Back to top |
|
|
|