Web Site File Guidelines and Directory Structure
Revised:
August 07, 2006
Contents
This document provides file name guidelines, details what index pages are
configured on the web server, and describes the default directories
provided within all kinetic service web sites.
Important: Your web site is hosted on a UNIX server
where the / character is used to separate directory and file names. That
notation is typically used in FTP clients to show directory paths and is used
within this document for the same purpose.
File Name Guidelines
Web publishers should follow these guidelines for naming files:
- Watch for mixed-case names. Pay close attention to the capitalization of
file names. A file named
HelloWorld.htm is considered a different file from
one named helloworld.htm. This is most important in <img> and
<a> HTML tags that reference file names within their attributes.
An incorrect file name in an <a> tag results in a "404- File
Not Found" an incorrect file name in an <img> tag results in
a missing graphic when the page is viewed. Many publishers find it easier to use
all lower-case names and use the - (dash) and _ (underscore) characters to emphasize
words within the names.
- Avoid special characters. Avoid using spaces and special characters in file names.
Instead, use the - (dash) and _ (underscore) in place of special characters.
Special characters to avoid include:
! # $ % ^ & * | ( [ { ) ] } ? : ; < > ` (grave accent)
' (single-quote) " (double-quote) and ~ (tilde)
Note: The / character cannot be used in a file name since this special
character is used to separate directory and file names on UNIX servers.
- Use .shtml or .shtm extensions for files with Server Side Includes (SSI).
If you use SSI in your web site files, name them with an
.shtml or .shtm
file name extension so that the web server knows it should process the files for SSI instructions.
Files without these extensions are not processed for SSI. As described in
Web Application Design Guidelines,
you can also use SSI in content generated by JSP pages and servlets
within web applications. For more information about SSI, see
Apache Web Server Resources.
Default Index Pages
The default index page is the web page that is automatically delivered to a browser if a
web page isn't specified in the URL. For example, when a viewer visits
http://kinetic.more.net/ in a browser, a web page is not specified and the
web server delivers the default index page. For a default index page to be displayed,
the directory referenced in the URL must contain a file with one of these four names:
index.html
index.htm
index.shtml
index.shtm
index.jsp *
index.php **
index.cgi **
The web server is configured to use the precedence shown above if a directory contains
more than one of these files. For example, if index.htm and index.shtm
files both exist in the same directory, index.htm will be delivered as the
default index page.
If a file with one of the four defined default index page names is not available in a directory, the
web server will deliver an index listing. An index listing begins with "Index of
/some-dir" (where some-dir is the name of the directory being listed) and then
lists the file names, modification dates, and sizes of the files in the directory. Although this can be
useful to present an FTP-style listing of files for download, it is often not what was intended. Create
a web page with one of the names listed above to correct this.
* Note that the default index page index.jsp
is only defined if the web site is enabled with a
Java Application Server add-on.
** Note that the default index pages index.php and index.cgi
are only defined if the web site is enabled with an
Application Server add-on.
Default Directories Within All Web Sites
The following subdirectories exist within the directory on the server for your kinetic
service web site:
/logs
/data
/reports
/www
/www/custom
/logs
The /logs directory contains your web server logs. Your web site's
HTTP requests for the week are logged and saved in the /logs/access_log.xx
text files. The errors for the week are saved in the /logs/error_log.xx
text files. The xx is a numerical file name extension to
indicate the week of the year. For example, the log file for the first week
of the year is named access_log.00, and the first error log
is named error_log.00. The current week's logs are stored
in the file with the largest numerical file name extension.
The logs are rotated once each week at 00:00 on Monday.
Since the log files can take up considerable space on the server, weekly
access and error logs are compressed using bzip2 once they are older than 5 weeks and
these files have the extension bz2, such as access_log.01.bz2.
Five weeks of logs are left uncompressed so that the software MOREnet uses to generate your
Web Statistics reports does not have
to uncompress the log files. Note that log files are only kept for one year.
Important: If you would like to use your own log analyzer, you can use
FTP to download the log files. The files in the /logs directory cannot be
modified.
/data
The /data directory contains application data files generated by PHP or
Perl applications running within the Application Server. These files are used by, but
not a web-browser visible part of, your web site. The Application Server is an add-on
component for kinetic Service hosted web sites. More information can be found
in the Application Server
documentation.
/reports
The /reports directory contains reports about your domain.
This directory is mapped to the http://[your-domain]/ar/ URL
so you can view the reports from the Web.
Note that the files in the /reports directory cannot be
modified.
See Reports for more information.
/www
The /www directory is the root directory for web site content.
"Document root" is another common term for the root directory of web site content.
Web publishers use FTP to save content to this directory and its subdirectories
for viewing from the Web.
In addition to typical HTML content, you can place a file named robots.txt
in this directory to control how web robots (such as search engines, HTML validators, etc.)
index the content of your site. See
Web Robots and robots.txt for more information.
/www/custom
The /www/custom directory contains HTML header and footer
files which are used by MOREnet-provided applications to give them a custom
appearance for your site. You can modify these files as described in
Custom Headers & Footers.
|