Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 04-29-2001, 09:57 PM   #1
MITotaku
Guest
 
Posts: n/a
Question CGI as homepage?

I was searching for places to host my site and I went to http://www.hostway.com.

The thing that interested about their webpage, is that their main (home) page was a cgi. Can someone tell me how to do this?
  Reply With Quote
Old 04-29-2001, 11:20 PM   #2
Member (12 bit)
 
Paul Victorey's Avatar
 
Join Date: Mar 1999
Location: MN or WI
Posts: 3,017
Sure. You either need to run your own server OR have permissions to create an .htaccess file to determine the names that it tries looking for if no filename is specified.

Usually, it will look for index.shtml, index.html, index.htm, but you can set this to anything. I usually just keep those but add index.cgi before them (the first one found is the one used).

If the server is set up to allow you to override directory indexing options, what you want is as simple as making a file called .htaccess and putting this line of text in it:

DirectoryIndex index.cgi index.shtml index.xml index.html index.htm

Note, you can give a path too, so it can use files that are not in the current directory (useful if scripts are kept elsewhere).
__________________
Paul M. Victorey
------------------
I am not responsible for any problems that may arise as a result of following my advice. This includes, but is not limited to, computer failure, loss of data, nuclear war, famine, boils, no clean laundry, your daughter running off with a biker gang, or armageddon. Take my advice at your own risk.
Paul Victorey is offline   Reply With Quote
Old 05-04-2001, 01:33 PM   #3
Staff
Premium Member
 
mairving's Avatar
 
Join Date: Jul 1999
Location: Arlington, TN
Posts: 5,538
If at all possible, you should avoid using a htaccess file. The main reason is performance. Everytime anything is accessed on your site it has to read the htaccess file for instructions. This really degrades performance. You are much better off putting this line, DirectoryIndex index.cgi index.shtml index.xml index.html index.htm in apache's config file, http.conf. A lot of hosts don't really like to put special things like this in the httpd.conf file because they have to restart the apache daemon for the config to work. This can knock off some users. I was able to talk mine into doing this though.

The way that I do it is to have my index.cgi buried in a passworded directory and call the file from the root directory by a symlink also called index.cgi. This gives a little bit better security. This only works on a Linux/Unix server running Apache, not a MS server.
mairving is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 07:15 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2