[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 213
  • Last Modified:

Is it possible...

Is it possible to submit information to a CGI script and recieve the output without actually going to the CGI url?

Say I went to:
www.mysite.com\index.htm

And submitted a form to:
www.mysite.com\my.cgi

But I didn't want it to say:
www.mysite.com\my.cgi

In the Address bar. I wanted it to say:
www.mysite.com\index.htm


Sorry if this text seems really confusing...it's the best I could do, though. :)
0
blind
Asked:
blind
1 Solution
 
shiversCommented:
if your server supports SSI includes (most do these days, especially if they give full CGI):

rename index.html to index.shtml (so the server parses it and runs the directives)

add the following line:

<!--#exec cgi="my.cgi"-->

this inserts the output from the CGI into the HTML page before sending it to the client.

(of course you could always just rename my.cgi to index.cgi - unless it really matters what it says in the location bar)
0
 
ercisCommented:
You can make browser go to URL returned by CGI script, who need to return only:
Location: index.htm\n\n
But, this is other story, how index.htm will be able to display new info ...
0
 
heitCommented:
you can do THE old trick to hide those ugly urls for your visitors by using frames, where the first frame is your cgi-formstuff and the other frame is a 1-pixel high empty frame. if you do this at your toplevel index.html the addressbar will only show

http://www.mydomain.com/
0

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now