I want to include an html page with in another html page. So I used the following code
<!--#include file="footer.html" -->
But it's not working. I am using Linux server. Is there is any other way to do this?Answer1:
To use that syntax you must enable <a href="http://bignosebird.com/ssi.shtml" rel="nofollow">SSI</a> and configure your server to process your files for it (by default, if SSI is turned on, most servers will only look for SSI directives in files ending in
If you want to do this in HTML, then your only real option is <a href="http://www.w3.org/TR/html4/present/frames.html" rel="nofollow">frames</a>, which have lots of <a href="http://www.google.co.uk/search?q=problems%20with%20using%20frames" rel="nofollow">drawbacks</a>.
You may be better off using a template language. I like <a href="http://template-toolkit.org/" rel="nofollow">Template-Toolkit</a> which you can use on the server (with Perl) or run offline (e.g. with the <a href="http://template-toolkit.org/docs/tools/ttree.html" rel="nofollow">ttree utility</a>).Answer2:
Linux is case sensetive ;). File should be in the same directory as the file from which you are calling it at the moment. And watch cases. If the file is called Footer.HTML or FoOter.html it won't open.Answer3:
Depending on how your server is set up you would need to confirm if you have enabled Sever Side Includes.
Here is an article that would assist you further. <a href="http://www.linuxtopia.org/HowToGuides/apache_ssi.html" rel="nofollow">http://www.linuxtopia.org/HowToGuides/apache_ssi.html</a>
Another way of doing it would be to use a server side language such as PHP