|
|||||||
![]() |
|
|
LinkBack | Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
|
#1 |
|
Guest
Posts: n/a
|
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? |
|
|
|
#2 |
|
Member (12 bit)
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. |
|
|
|
|
|
#3 |
|
Staff
Premium Member
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. |
|
|
|
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|