Rules for optimal file management on webserver

Nov 6, 2007 18:07 GMT  ·  By

When you decide to build a website, the first thing you must do is take a piece of paper or create a text file, where you will note the preliminary site structure. This aspect is very important, because it will influence directly the files and the modality of directories organization on a local computer or a web server.

It would be ideal to create a structure of logic directories on your home computer. The directories' structure must reflect the desired site map totally. You can also install a web server on your home computer in order to test your website or to create the web site directory structure directly on it.

The role of preliminary web site planning and directories organization is to simplify the web site update actions. For example, if you move certain parts of your web site content, such as images, audio or video files or even HTML pages, you could be forced to modify many links in other documents and this action might take a lot of your time.

For simple web sites, having ten or twenty HTML pages, you could create a single directory on the web server, where the HTML documents and images could coexist. But it is recommended to create a directory corresponding to every type of file you may use, such as images, videos, audio, scripts and more. You can select this method of files organization on server when the number of files is not too high.

For example you cannot manage efficiently a single image directory containing over fifty or more images. At this point a hierarchycal directory structure implementation is imposed, when you can distribute all images in various subdirectories in the same image directory.

All HTML documents can go in the root of your web server in order to simplify the links' structure. You should use index files for all subdirectories in order to have a clear navigation structure of your website. The files must be named without using spaces and according to their content or actions, because they will be easier to find and manipulate. By maintaining a logical structure of your website, you will discover how easy it will be to update and reorganize it in the future.