Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

html include

Posted on 2005-04-17
7
Medium Priority
?
196 Views
Last Modified: 2013-11-18
What are the minimum requirements to enable an include to work in an html file, eg:

<!--#include file="footer.html" -->

From reading on the net I think with Apache I think I either need to do a CHMOD on the file and make it executable or I need to change the file extension to shtml and specify in the Apache config file that all shtml files are to be processed for SSI's.

 
0
Comment
Question by:ncw
  • 4
  • 3
7 Comments
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13802075
http://dent.home.ah/manual/howto/ssi.html

You need to configure apache for server parsed files in httpd.conf:

  AddType text/html .shtml
  AddHandler server-parsed .shtml

chmod is not necessary (except you want to wotk with the XbitHack, which i'd not recommend)
0
 
LVL 1

Author Comment

by:ncw
ID: 13802299
The link is not working for me, but I did read this in the conf file and I uncommented the relevant lines, stopped and restarted Apache, but didn't get the include to work.

The file with the include does have a shtml extension, and Apache is running on Windows 2003 server.

0
 
LVL 51

Expert Comment

by:ahoffmann
ID: 13804120
http://httpd.apache.org/docs/howto/ssi.html

what does your error_log tell you? please post relevant messages

> The file with the include does have a shtml extension, and Apache is running on Windows 2003 server.
silly question: you're using NTFS without DOS-compatible mode (8.3)?
0
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 1

Author Comment

by:ncw
ID: 13804399
Where should the following line go in the conf file and is it exactly as written?

Options +Includes

>you're using NTFS without DOS-compatible mode (8.3)?
I'm not sure where I would check this. It is NTFS but I don't know what version.
0
 
LVL 1

Author Comment

by:ncw
ID: 13804425
I've added Options +Includes just before AddType text/html .shtml, then stopped and started the server, but no change, ie the include is not working.
0
 
LVL 51

Accepted Solution

by:
ahoffmann earned 600 total points
ID: 13805063
you need in <Directory / >
 Options Includes <other options here>

then enshure that you directory where the .shtml files are does not have
  Options -Include
0
 
LVL 1

Author Comment

by:ncw
ID: 13805176
YES! It's working once I added the following lines:

<Directory "D://wwwroot" >
  Options +Includes
</Directory>

Thanks very much!
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Preface This is the third article about the EE Collaborative Login Project. A Better Website Login System (http://www.experts-exchange.com/A_2902.html) introduces the Login System and shows how to implement a login page. The EE Collaborative Logi…
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
Viewers will learn about the regular for loop in Java and how to use it. Definition: Break the for loop down into 3 parts: Syntax when using for loops: Example using a for loop:
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.
Suggested Courses

580 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