Version 3.1 User's Guide |
|
Serving Cloaked Files |
Previous |
Next Contents |
Due to limitations in how CGIs interact with the server, the NetCloak CGI is limited to a file size of 60k bytes. All files larger than 60k will be truncated by the CGI before they are passed to the server. In some cases, even 60k may be too much data for your server to handle in a single request.
This limitation does not apply to the NetCloak plug-in. If you notice problems when serving large files (over 32k) with NetCloak, the best solution is to use the plug-in whenever possible. You can also read the NetCloak FAQ list at "www.maxum.com" for up-to-date information on handling larger files with the CGI.
In addition to dynamic page and forms-processing commands, NetCloak supports caching for HTML files and special NetCloak file aliases.
NetCloak includes an intelligent dynamic file caching feature. Dynamic caching must be enabled using the Configuration page in the web admin interface, or the Configuration dialog in the NetCloak CGI. When enabled, NetCloak will cache the 100 most-requested files which fit into the available RAM. These 100 files are in addition to the files aliased (and cached) by the NetCloak.config file. Note, however, that NetCloak will only cache HTML files that it processes, not images or other files.
NetCloak's dynamic cache checks the last modified date of cached files every time the file is served . Thus, when a cached file is modified, the new version will be automatically re-cached the next time it is accessed, without flushing other cached files. This ensures that files in the cache are always fresh, and eliminates the overhead of files being removed from the cache unnecessarily. The downside to operating this way is the small amount of time it takes to check the modification date each time a cached file is served.
NetCloak supports aliases to cloaked files in its configuration file, which resides in the NetCloak Files folder and is called NetCloak.config. A NetCloak alias is a shortcut that you can use in place of the full path to an HTML document. You should not confuse this with Finder aliases, which are unrelated.
Aliases provide several benefits, most important of which are:
Alias names add a layer of security by allowing you to hide the real name and path of the document from the user. Since these aliases only exist in NetCloak these are more secure than Finder aliases.
2. Aliased documents are automatically cached by NetCloak at startup and served from a very fast RAM-based cache.
The NetCloak.config file in your NetCloak Files folder is a text file that you can edit with any text editor or word processor. It consists of all of the NetCloak alias names and files that they correspond to. Each line of the file will contain an alias name followed by the path to the file to be served, separated by a ??? tab or a space.
All files placed in the NetCloak.config file will be read immediately into RAM when NetCloak starts. If you have frequently accessed pages on your server you may wish to place them in this file whether or not you wish to refer to them by another (aliased) name. The path may be:
a file name - files in the root folder selected in NetCloak's Configuration window need only to be referenced by name.
a relative path - files in a folder contained in the root folder selected in NetCloak should be referenced by a relative path name. Relative path names start with a colon or slash and include the names of each folder containing the folder where the file is located.
a full path - files not contained in the root folder or a folder enclosed in it must be referenced by a full path. A full path must start with the name of the volume where the file is stored followed by the name of each folder containing the folder where the file is located.
For Example, the NetCloak.config file might look like this:
StartPoints.html StartingPoints.html
RelativePath.html :PageFolder:MyPage.html
FullPath.html HardDisk:DocFolder:Full.html
Full or relative pathnames may use either colons or slashes to separate folder names.
Alias names may start with slashes, however, a leading slash will have no effect. NetCloak will not allow an alias to a folder, but if you wish, alias names may also include slashes to create the appearance that the files are coming from a particular folder. Links must contain the complete alias name, but any folder names included in the alias name need not actually exist.
There must be at least one space in between the alias name and the document path. Also, it is very important to end the alias name with the file extension used to cloak your files. If this extension is not included, the server will not use NetCloak to process the pages and will return a File not found error to the user.
To browse or link to an aliased document, simply reference the alias name as if it were in the root folder. For example, the file FullPath.html above would be linked by the URL:
http://your.server.com/FullPath.html
As stated above, aliased documents are loaded into RAM when NetCloak is started. If you add or change a NetCloak aliased document, you must have NetCloak reload all the aliased documents. One way to do this is to quit NetCloak and restart, but two additional methods are provided.
1. Send the reload command from a web browser. Request the URL below (substituting the name or address of your server:
http://your.server.com/RELOAD.nclk
Actually, any URL with "RELOAD" in all caps and a suffix that will be processed by NetCloak will work.
2. Choose Reload Documents from the File menu within the NetCloak CGI. (This option is only available if you are using the NetCloak CGI, and won't work if you are cloaking using the NetCloak plug-in.)
Copyright © 1996-2000 Maxum Development Corporation http://www.maxum.com/ |
Previous |
Next Contents |