Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

SSI - How to include a page inside another page?

Posted on 2008-10-13
6
Medium Priority
?
2,085 Views
Last Modified: 2013-12-08
I tried to use the Dreamweaver funtion to add server includes. I want to include one page inside another page that is already using a template. In Dreamweaver the page looks how it supposed to, but in the internet browser the page is empty, meaning the page that was supposed to be included is not there. What am I doing wrong?

This is the part of code that is not working:
<!--#include file="meetings2008.html" -->
<div id="maincontent">
	<div id="content">
	<!-- InstanceBeginEditable name="Contenu" -->
		<h1 class="h1green" >Comités Budgétaires COBU (PE) & ComBud (Conseil) Comptes rendus des réunions</h1>
	                     <!--#include file="meetings2008.html" -->
		<!-- InstanceEndEditable -->
	</div>
</div>

Open in new window

empty-page.GIF
0
Comment
Question by:Luiza1
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
6 Comments
 
LVL 14

Expert Comment

by:yessirnosir
ID: 22701774
a couple of  things to check
-have you verified that your server is setup to handle SSI?
-is your file extension shtml, to trigger the server to check for SSI?
see this for more info:  http://httpd.apache.org/docs/1.3/howto/ssi.html#configuringyourservertopermitssi
0
 

Author Comment

by:Luiza1
ID: 22702119
Ok, first one is yes. Now explain me more the second point. On the tutorial I read that you don't have to change your file name into shtml, by using XBitHack on
Where in the page code do I have to add this "XBitHack on" and where do I add the second part:
"So, to add SSI directives to an existing page, rather than having to change the file name, you would just need to make the file executable using chmod:
        chmod +x pagename.html"

Can you show me an example?
0
 
LVL 14

Accepted Solution

by:
yessirnosir earned 2000 total points
ID: 22702339
the chmod +x pagename.html refers to changing the permissions of the file on the server.  how you would do it depends on your environment; personally I use "FileZilla" FTP client, right-click on the file, choose "File Attributes", and use the graphical user interface to choose the permissions I want. Then FileZilla creates the chmod command for me.

As for turning xbit hack on, here's a link with some info part way down the page:  http://www.parkansky.com/tutorials/bdlogxbh.htm.    You may have to contact your server support people to verify exactly what needs to be done in your case.  Note that the link also discusses the other option of simply creating an .htaccess statement that tells your server to parse all your pages for SSI.  The Apache tutorial recommends against that, but it really depends on what percentage of your pages you anticipate having SSI on.  If most of them have SSI, then there won't be much of a performance hit if you parse everything for SSI.

btw... you can also do includes with PHP or ASP, so if you are using either of those already on your site you might think about doing your includes the same way.  Personally I use PHP on almost all my web pages, and I use PHP include statements rather than SSI.  My .htaccess is set to interpret all .htm and .html documents for php, so no need to change file extensions to php.
0
 

Author Comment

by:Luiza1
ID: 22702466
Ok, just one last question. In all those tutorials I can't make the difference between the normal page (np) and the page I want to include (ip) inside several of those normal pages. On which page, np or ip do I put the code "XBitHack on", on which page the attributes "chmod +x pagename.html" should go and which pages need to be parsed, np or ip?
0
 
LVL 14

Expert Comment

by:yessirnosir
ID: 22702916
only pages with the "include" statement, which I think you are referring to as  "normal pages", needs to have the xbit hack on.  
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction Since I wrote the original article about Handling Date and Time in PHP and MySQL several years ago, it seemed like now was a good time to update it for object-oriented PHP.  This article does that, replacing as much as possible the pr…
SSL stands for “Secure Sockets Layer” and an SSL certificate is a critical component to keeping your website safe, secured, and compliant. Any ecommerce website must have an SSL certificate to ensure the safe handling of sensitive information like…
This Micro Tutorial will demonstrate how nuggets on the Web are formatted by using Chrome Developer Tools. These tools would not only view the site's CSS but it can also modify it and save the CSS to use on your own site.
Shows how to create a shortcut to site-search Experts Exchange using Google in the Chrome browser. This eliminates the need to type out site:experts-exchange.com whenever you want to search the site. Launch the Search Engine Menu: In chrome, via you…

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question