Hi, I have set up a server side include on http://www.oohoi.com/index.htm as: <!--#include virtual="headerfile.htm"--> and the headerfile.htm is in the same directory as the index.htm. But, the include does not work. I contacted hosting support and they say that it should work (and that they do not offer any scripting support ) I tried changing permissions to headerfile.htm and allowed ALL access (777), but that does not work either (currently reset to 644). Am pulling my hair out. Help appreciated. Thanks Ajeet
normaly when you do a ssi include you need to name the file xyz.shtml not .htm if you name it .htm and still use ssi then add this to your htdocs. AddType text/html .shtml .html .htm AddHandler server-parsed .shtml .html .htm Options Indexes FollowSymLinks Includes follow this link for info http://www.htmlite.com/HTA007.php
Right now the server thinks it's a html comment. If your using .ASP I think the file extensions need to be .asp OR there should be a way to tell the server to process .htm as .asp but I'm not a server geek EDIT: what Softbrix said
I may be wrong here but at a glance I'd say your code should read: <!-- #include virtual="headerfile.htm" --> Note the spacing between "--" and "#"
Hi, It did not work. I am now including a .shtml file (and the .shtml file is present in the same directory). I even tried playing with the spaces, but no permutation seems to work. Any further thoughts will be appreciated. Thanks Ajeet
If I'm in a regualr .html doc I have the following code: <?php include ('nav-top.php'); ?> Code (markup): and in this file is normal .html code in my .htaccess (to ensure the includes works) I have AddType application/x-httpd-php .php .htm .html Code (markup): This has helped on many sites I run
The other way around - there can be no space there. Some environments can handle both forms (e.g. ASP), but Apache v2 works only if there's no space. J.D.