homepage Welcome to WebmasterWorld Guest from 184.73.52.98
register, free tools, login, search, subscribe, help, library, announcements, recent posts, open posts,
Accredited PayPal World Seller

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




msg:966276
 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




msg:966277
 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




msg:966278
 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




msg:966279
 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




msg:966280
 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




msg:966281
 10:10 pm on Jul 22, 2003 (gmt 0)

Thanks that done the trick :)

g1smd




msg:966282
 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.
Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About
© Webmaster World 1996-2014 all rights reserved