tags:

views:

283

answers:

3

I am making a site right now and I want to include the sidebar in every page. I have looked everywhere and everyone says to use the following code:

<!--#include virtual="insertthisfile.html" -->

I have done this but to no avail. I am using dreamweaver for easier uploading and managing of my files, and it shows up in dreamweaver. I would just use PHP but I dont want all of my pages to be PHP for just one code that can work in HTML..

Any ideas?

+4  A: 
  • Make sure the (including) file has a .shtml extension
  • Make sure server-side includes are enabled in the web server
Rob
+5  A: 

That isn't an "HTML" feature. It's Server-Side Includes. You need to make sure you have SSI active on your server and that it's set to apply to the file.

Chuck
Do you have any suggestions for including?
Chris B.
+2  A: 

This page has a lot of info on Server and Client side includes. It shows a couple of alternatives to the #include also.

Start by trying to rename the .html file to .shtml. Also, make sure server side includes are enabled on your server.

Sorskoot
Turns out server side includes are already active, once I changed the extension to .shtml it worked. Thanks.
Chris B.