★ wanayoo — archive 1999 http://webdeveloper.com/drweb/19980713-drweb.htmlNouvelle recherche | Portail wanayoo
internet.com

Go to WebDeveloper Home

Seek and you shall

or search all of internet.com
Looking for a Site Map?
Vote for WD!
Please keep
voting for us
as a Top 100
Web site!

The Web Developer Network
WebDeveloper.com
Streaming Media World
WebReference.com
Web Developer's Virtual Library
BrowserWatch
Java Boutique
Web Developer's Journal
JavaScript Source
ScriptSearch
Web Developer Forums
Web Developer News

internet.com
Internet News
Internet Stocks
Internet Technology
Web Developer
Internet Marketing
ISP
Downloads
Internet Resources
International

Search internet.com
Advertising Info
Corporate Info
Internet Trade Shows

internet.commerce
Be an Affiliate
Be a Partner
Software Store
Computer Help
Register a Domain
Be Domain Registrar
e-solutions
Internet Jobs
A/V Network
Map Your Website
Rent E-mail Lists
Bookstore
Press Release dist.
Sell Ad Space
Internet Research
Venture Capital
Web Publishing
Build Your Intranet
Expert Advice
Get e-Biz Intell.
Content for Websites

  Webopedia
D R .   W E B S I T E
WebDeveloper.com

July 13, 1998

Setting Default Web Directories; Automatically Loading Pages

By David Fiedler and Scott Clark
Dear Dr. Website: When I go to some sites, for example, www.yoursite.com/~user/, I get a directory listing of ~user, but sometimes I get ~user/index.html. How do I set up my site to offer not the directory listing but index.html?

If you're running a Microsoft server, the solution is simplicity itself. Go to the Internet Services Manager for your Web server and find the Directories tab, where you will see a checkbox labeled Enable Default Document. If you check that, the filename you specify will be the default for any directory under that server. Index.html is the most common, and we recommend it, but some installations use index.htm, welcome.htm(l), or default.htm(l). There's also a checkbox for Directory Browsing Allowed, which lets visitors view a directory listing if the default does not exist or is unreadable. You generally don't want this option turned on for Web servers, but you do want it for FTP servers so visitors can see what's there.

On Unix-based servers, such as Apache, it's still straightforward, just different. You'll have to edit the srm.conf file (in the conf directory, although some installations use the httpd.conf file for this instead), looking for (or adding, if necessary) lines containing several variables.

UserDir: this is where you specify the "default name" for a user's directory that would be visible to a Web visitor. It would look like

UserDir www
or
UserDir disabled
If you disable it, as in the line above (which does not set it to a directory called disabled!), this would mean that the user's home directory (~user) would also be their Web directory. Many ISPs have this set to public_html, which is the default.

DirectoryIndex: this is where you specify the file or files that can be used as the default when you visit a directory. You can set multiple files, and the first match will connect; just separate the names with spaces:

DirectoryIndex index.html index.htm default.html default.htm

Dear Dr. Website: My company is trying to develop an online catalog. All our data resides on an IBM AS/400, but I know we can write CGI programs to interface with our legacy code. What are the downsides, if any, to developing in straight CGI?

Each time a page references (calls) the CGI code, a new process is spawned, which could put considerable strain on the server. You may want to use a program such as Attachmate's Host-to-Web Publishing System, which lets you easily put your AS/400 data online. Although it can use CGI, the system supports NSAPI and ISAPI, both of which allow you to avoid making repeated CGI calls.

Dear Dr. Website: After having an animated GIF load and play on a blank page, I want the next page to load automatically. Is there an easy way to do this?

Sure. We whipped out this solution with Macromedia's Dreamweaver:

<p>
<script language="JavaScript">
function MM_goToURL() { //v1.2
for (var i=0; i<(MM_goToURL.arguments.length - 1); i+=2)
	//with arg pairs
eval(MM_goToURL.arguments[i]+".location='"
	+MM_goToURL.arguments[i+1]+"'");
document.MM_returnValue = false;
}
</script>


<img src=/old?u=http%3A%2F%2Fwebdeveloper.com%2Fdrweb%2F%26quot%3Blivetile.gif%26quot%3B&y=1999 width="116" height="60"
ALT="Internet World Live"
onLoad="MM_goToURL ('parent','http://webdeveloper.com');
return document.MM_returnValue">
<p>

For a working demonstration of Dr. Website's code, click here. Watch how WebDeveloper.com automatically loads from this page after the animated GIF finishes loading!

WebDeveloper.com shows you a lower-tech way to do this--but you'll have to guess at the load time.


Visit The Dr. Website Archives.
Click here for a list of Dr. Website's most frequently asked questions (and answers!).
Send your own question to Dr. Website.

Fast Jump to Anywhere on WebDeveloper.com:

Silicon Alley Jobs



Copyright © 1999 internet.com Corporation
All Rights Reserved. Legal Notices.
Contact the WebDeveloper.com staff

Last modified: Wed Sep 22 06:06:12 EDT 1999

http://www.internet.com

 

Refresh Daily
Join Editor-in-Chief David Fiedler The Editor With No Time and find truth, justice, and a clue or two.


Browse by Category
[ Site Map ]

ActiveX / VBscript
Animated GIF Archive
Browsers
CGI / Perl
Database Connectivity
E-Commerce
HTML-Advanced: DHTML, CSS
HTML / Site Authoring Tools
Intranet/Groupware
Java
JavaScript
Multimedia: Audio / Video / Streaming Technologies
Opinions
Refresh Daily: Editorial Column
Security
Servers & Server Tools
Site Design / Graphics
Site Management / Marketing / Log File Analysis
VRML / 3D
XML