<head><title>foo</title>
<metas...></head>
<body>
<!--#include virtual="/remote.htm" -->
</body>
</html>
Apache just INSERTS the contents of "remote.htm" into the output stream. So...the head section an all tags have already be sent by the first file. SSI includes are just simple "inserts". You can mix and match files at will with any content. What you see in the browser, is just what the server sent.
For example over on search engine world, each page has 6 ssi includes.
1- default header info is built
<!--#include virtual="/cgi-bin/headers.cgi?root"-->
- meta tags inserted here
2- custom title tags
<!--#include virtual="/cgi-bin/top.cgi?subtitle=%3ca%20href%3d%22http://www.searchengineworld.com/misc/%22>Misc</a>%20/%20Cloaking%20Overview"-->
- /head closed and /body opened in 2
3- advertising code insert
<!--#include virtual="/cgi-bin/burst.cgi?richmedia"-->
- bulk of page content output from whatever file we are parsing here.
4- a counter is called
<!--#include virtual="/cgi-bin/cntr.cgi"-->
(often I run two counters, one at top and one at bottom of page to watch for reloads as a sign of server problems.)
5- right side navigation menu is printed
<!--#include virtual="/cgi-bin/menu.cgi"-->
6- finaly, the bottom is printed with copyright..etc, and the html closed out.
<!--#include virtual="/cgi-bin/bottom.cgi"-->
(filenames changed out of self protection)
The "included" file has only what is needed. If you put meta and head tags on the "included" file, then it might be out of place on the "includer file.
Does that make sense?
-G
If you want to include a navigation table, all the SSI source page needs to have is the actual nav table code (from <table> to </table> ). The SSI source page can be a .txt file if you like, or an .html file, etc.
When setting up the SSI includes, ask yourself, "What code would I have to cut & paste to insert this page element directly into my main .html page?" That's exactly the same code you need to have in your SSI source file...