homepage Welcome to WebmasterWorld Guest from 23.22.173.58
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Pubcon Platinum Sponsor 2014
Home / Forums Index / WebmasterWorld / New To Web Development
Forum Library, Charter, Moderators: brotherhood of lan & mack

New To Web Development Forum

    
How can i display a cgi script on...
Mick_77

10+ Year Member



 
Msg#: 685 posted 7:01 pm on Jul 12, 2003 (gmt 0)

... by default when someone types in mysite.com .. instead of index.html showing?

This is for a directory iam creating so i need cgi-bin/mydir/index.cgi showing, if you know what i mean :)

Mick

 

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 685 posted 8:22 pm on Jul 12, 2003 (gmt 0)

You write the index.html page with normal HTML head and body, normal HTML tags, and so on, and then reference the script inside that file. The script then outputs whatever it does into the body of the index page that is being sent out to the browser.

universalis

10+ Year Member



 
Msg#: 685 posted 8:43 pm on Jul 12, 2003 (gmt 0)

If you are using Apache, use the DirectoryIndex directive in the httpd.conf or .htaccess:

[httpd.apache.org...]

Thus:

DirectoryIndex index.cgi index.html index.htm

would look for index.cgi first, then index.html, etc.

I'm sure you can do this in IIS if you are using a Windows server, but as I don't, I don't know how!

Mick_77

10+ Year Member



 
Msg#: 685 posted 3:40 pm on Jul 13, 2003 (gmt 0)

You write the index.html page with normal HTML head and body, normal HTML tags, and so on, and then reference the script inside that file. The script then outputs whatever it does into the body of the index page that is being sent out to the browser.

g1smd can you go into more detail about how to do this? , thats just what iam looking for...

chairwars

10+ Year Member



 
Msg#: 685 posted 8:07 pm on Jul 21, 2003 (gmt 0)

To include the cgi script in the html page, put a tag like the following in the body of your page:

<!--#include virtual="/cgi-bin/mydir/index.cgi"-->
or
<!--#exec cgi="/cgi-bin/mydir/index.cgi"-->

Depending on your server you may need to change the page to index.shtml
Hope that helps.
Dave

Mick_77

10+ Year Member



 
Msg#: 685 posted 10:10 pm on Jul 22, 2003 (gmt 0)

Thanks that done the trick :)

g1smd

WebmasterWorld Senior Member g1smd us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 685 posted 8:15 pm on Jul 24, 2003 (gmt 0)

Ooops. Sorry, I didn't see that this thread had been bumped.

Glad you eventually got the answer you required.

Global Options:
 top home search open messages active posts  
 

Home / Forums Index / WebmasterWorld / New To Web Development
rss feed

All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
© Webmaster World 1996-2014 all rights reserved