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

A bit OT: CGI question

 [1/6] from: robert:muench:robertmuench at: 19-Feb-2002 20:58


Hi, I use a Rebol script that takes the input from a form and sends an email and returns a confirmation page to the client. The rebol script is located in cgi-bin/ directory the web pages are located in a html/ directory. The problem is that the references inside the confirmation page a now all relative to the cgi-bin/ directory and not to the html/ directory. Any idea how this can be fixed? Next thing is that the displayed URL in the address entry field, shows the link & name of the Rebol cgi script and not the URL of the conformation page. Robert

 [2/6] from: tim:johnsons-web at: 19-Feb-2002 18:25


* Robert M. Muench <[robert--muench--robertmuench--de]> [020219 11:38]:
> Hi, I use a Rebol script that takes the input from a form and sends an email and > returns a confirmation page to the client. The rebol script is located in > cgi-bin/ directory the web pages are located in a html/ directory. > > The problem is that the references inside the confirmation page a now all > relative to the cgi-bin/ directory and not to the html/ directory. Any idea how > this can be fixed?
I haven't seen your code - mind sending some? or at least save the content as some link that is reachable from the "outside world". That way I can look at it....
> Next thing is that the displayed URL in the address entry field, shows the link > & name of the Rebol cgi script and not the URL of the conformation page. Robert > > -- > To unsubscribe from this list, please send an email to > [rebol-request--rebol--com] with "unsubscribe" in the > subject, without the quotes.
-- Tim Johnson <[tim--johnsons-web--com]> http://www.johnsons-web.com

 [3/6] from: hallvard:ystad:helpinhand at: 20-Feb-2002 9:18


Dixit Robert M. Muench (20.58 19.02.2002):
>Hi, I use a Rebol script that takes the input from a form and sends an email and >returns a confirmation page to the client. The rebol script is located in >cgi-bin/ directory the web pages are located in a html/ directory. > >The problem is that the references inside the confirmation page a now all >relative to the cgi-bin/ directory and not to the html/ directory. Any idea how >this can be fixed?
If you print out the following inside the HTML <HEAD>-tag, this shoud no longer be a problem: <BASE HREF="thehtmldirectory">
>Next thing is that the displayed URL in the address entry field, shows the link >& name of the Rebol cgi script and not the URL of the conformation page. Robert
This is normal behaviour. The only workaround I know for this, is to send the originating form to some other page, say htmldirectory/confirmation.html, and then use a scriptalias in the httpd.conf file to redirect it to your rebol-script. ~H

 [4/6] from: al::bri::xtra::co::nz at: 20-Feb-2002 20:56


Robert wrote:
> Hi,
Hi, Robert!
> I use a Rebol script that takes the input from a form and sends an email
and returns a confirmation page to the client. The rebol script is located in cgi-bin/ directory the web pages are located in a html/ directory.
> The problem is that the references inside the confirmation page a now all
relative to the cgi-bin/ directory and not to the html/ directory. Any idea how this can be fixed? Make sure all references in the HTML specify filenames like: /html/picture.png /html/script.js in other words, make sure the root directory "/" is first.
> Next thing is that the displayed URL in the address entry field, shows the
link & name of the Rebol cgi script and not the URL of the conformation page. Write a redirect header back to the browser. Something like: print "HTTP/1.1 302 OK" print join "Location: " %/html/confirmation.html print "^/" Or write a small html page with a refresh tag in the header to the confirmation html page. Something like: print { <html> <head> <title>Redirecting...</title> <meta http-equiv="Refresh" content="0; URL=/html/confirmation.html"> </head> <body></body> </html> } or in my HTML dialect: print HTML [ head [ title "Redirecting..." refresh 0:00 %/html/confirmation.html ] body [] [] ] Andrew Martin ICQ: 26227169 http://valley.150m.com/

 [5/6] from: mario:cassani:icl at: 20-Feb-2002 8:22


Hallo Robert,
> cgi-bin/ directory the web pages are located in a html/ directory.
If you mean: websitepath/ websitepath/cgi-bin/ websitepath/html/
> The problem is that the references inside the confirmation > page a now all > relative to the cgi-bin/ directory and not to the html/ > directory. Any idea how > this can be fixed?
use: ../html/referenced-file.html and not referenced-file.html
> Next thing is that the displayed URL in the address entry > field, shows the link > & name of the Rebol cgi script and not the URL of the > conformation page. Robert
I hate "them", but if you want to hide (to the dummy only), the "real" page address frames (bleach!) are "useful"... Zaijian Mario

 [6/6] from: tomc:darkwing:uoregon at: 20-Feb-2002 0:06


Hi Robert, I also have such a script, mine is a functional replacement for the old standard 'cgiemail I also have the same problem with funky relative to the cgi-bin urls. I tried a few things mainly to get the clients browser to see a 307 redirect code, but that angle does not pan out since the webserver is supplying it's own response header and our script is supplying the content. I even went so far as to attempt to bypass the webserver and insert my response header directly into a port opened on the client, but that fails badly (at least) when the client is behind a firewall, and most likely a bad idea (tm) in general It would be great to hear a solution but I'm not holding my breath. On Tue, 19 Feb 2002, Robert M. Muench wrote: