473,325 Members | 2,774 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Question: file extentions and correct server-side include commands

Mo
Hi all,

I hope that someone out there can help me with a problem I have been having.

I have just finished creating a website and have added a header to most of
the pages on my site. The header is included in each page with the <!--
#include file="myHeader.htm" -->, where myHeader.htm is the header file. The
pages with the include directive all have the file extention ".htm".
The problem is that with the set up above the pages are not including the
header - when I request the appropriate page using a browser there is just a
blank area on the web page where the header should be.

However, if I change the extention of requested page to ".asp" and then
request it with my browser the myHeader.htm file IS included correctly.
Why is this happening - surely, all the pages should have a ".htm" or
".html" extention? I know that the server in use by the ISP hosting my site
is Apache but they have not been very helpful when I asked them the same
question.

So, the site works fine with all pages having ".asp" extentions (except the
header which has a ".htm" extention) but I'd like to know why?

Thanks for any help you can give.

Mo
Jul 20 '05 #1
2 1914


Mo wrote:
I have just finished creating a website and have added a header to most of
the pages on my site. The header is included in each page with the <!--
#include file="myHeader.htm" -->, where myHeader.htm is the header file. The
pages with the include directive all have the file extention ".htm".
The problem is that with the set up above the pages are not including the
header - when I request the appropriate page using a browser there is just a
blank area on the web page where the header should be.

However, if I change the extention of requested page to ".asp" and then
request it with my browser the myHeader.htm file IS included correctly.
Why is this happening - surely, all the pages should have a ".htm" or
".html" extention? I know that the server in use by the ISP hosting my site
is Apache but they have not been very helpful when I asked them the same
question.

So, the site works fine with all pages having ".asp" extentions (except the
header which has a ".htm" extention) but I'd like to know why?


Server side include directives need to be enabled, they are often
enabled for .shtml pages but not for .html pages as that would require
the server to parse and process HTML pages on every request.
Ask your ISP for what file suffixes SSI is enabled.
ASP supports <!-- #include> directives but not other SSI directives.
--

Martin Honnen
http://JavaScript.FAQTs.com/

Jul 20 '05 #2
Mo pounced upon this pigeonhole and pronounced:
Hi all,

I hope that someone out there can help me with a problem I have been having.


I just answered you in the other group. Please don't multipost.

--
-bts
-This space intentionally left blank.
Jul 20 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: berehneh | last post by:
i have a site in a host with adomain i can run php with .php files but i can 't use php in .htm file. how can i do this
0
by: Alex | last post by:
Hi, Whan I trying to open a NEW Visual Basic ASP.NET project(I got Windows 2003 server),then I got an error: The default web access for this project is set to file share,but the project folder...
8
by: David P. Jessup | last post by:
Well I have seen this posted before and haven't seen much in response. My application has to browse through various folders and find file names. Sometimes these folders can have thousands of...
8
by: macaronikazoo | last post by:
hi i'm after a way to securely upload a file to a web server and I'm wondering how to go about it. basically i want to upload a small text file to my hosted webspace once every hour or so. ...
0
by: praba kar | last post by:
Dear All, I have doubt regarding file uploading. When we upload a file to the remote server we can get file type through file extentions. How we can find out file type if a file doesn't have...
0
by: Tess | last post by:
Hi, Long time reader, first time poster... Any help is appreciated. I have a few questions regarding Winform controls embedded within an html page. For more info please see the appendix. Now,...
3
by: Marco Martin | last post by:
Good Day Group, I'm trying to make my application open and run some code when a user clicks on a file with an associated extension. This is *my* understanding of what actually happens, please...
18
by: mollyf | last post by:
I just installed SQL Server 2005 on my PC (the developer's edition) yesterday. I have some scripts written by one of my coworkers to create some tables and stored procedures in a database that...
7
by: boyd.roberts | last post by:
Hello All, I am trying to generate a list of files in a directory on a website, which only includes a defined list of file extentions. Below is my code but i have an issue that this only...
2
by: Ken Fine | last post by:
I want to add the security question and answer security feature to the ChangePassword control. I am aware that this functionality is built into the PasswordRecovery tool. I have implemented the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.