[ Team LiB ] |
Recipe 8.10 Including a Standard HeaderProblemYou want to include a header (or footer) in each of your HTML documents. SolutionUse SSI by inserting a line in all your parsed files: <--#include virtual="/include/headers.html" --> DiscussionBy using the SSI include directive, you can have a single header file that can be used throughout your web site. When your header needs to be modified, you can make this change in one place and have it go into effect immediately across your whole site. The argument to the virtual attribute is a local URI and subject to all normal Alias, ScriptAlias, RewriteRule, and other commands, which means that: <--#include virtual="/index.html" --> will include the file from your DocumentRoot, and: <--#include virtual="/cgi-bin/foo" --> will include the output from the foo script in your server's ScriptAlias directory. If the argument doesn't begin with a / character, it's treated as being relative to the location of the document using the #include directive.
See Also |
[ Team LiB ] |