473,805 Members | 1,929 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 1929


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
3267
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
4441
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 at: "http://localhost/webapplnew" cannot be opened with the path: "c:\inetpub\wwwroot\webapplnew".The error returned was: Unable to create web project webapplnew.The file path "c:\inetpub\wwwroot\webapplnew" does not correspond to the
8
3057
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 files in them, and of course looping through each file to find the right one can take a bit of time. I'm using classic ASP and was wondering if there are any other methods available to speed up this process other than hardware upgrades. My...
8
1634
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. because it will be happening once an hour, i want to make sure the transaction is encrypted, but i don't really know how to do this. can someone point me in the right direction? i'm a reasonably noob scripter so go easy on me. :) thanks! -h.
0
1188
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 any extentions ? with regards PRabahar
0
2601
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, for the questions. 1. A button on my control executes the System.IO.Directory.GetDirectories funtion (the scanned directory resides on the hosting web server). What credentials is this
3
1598
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 correct me if I am wrong. I've searched the net, but there doesn't seem to be much on the subject. 1) When using the DotNetPackager (called dotfuscator I believe), we can associate files with a specific extension to a specific program. ...
18
6722
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 I've already created on my computer. Whenever I go to open the script file (whose icon shows that it's a SQL Server Query File and I've got the file type set to open with SQLWB - SQL Server Management Studio), the file opens in Notepad instead of...
7
2316
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 returns the first file in my includelist. <%
2
7671
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 PasswordRecovery with a Password reset required; a temporary password is sent to the account on file. I want an extra layer of security to accommodate the very unlikely contingency that someone's e-mail account is compromised. Challenging with the...
0
9716
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9596
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10360
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10105
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9185
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
1
7646
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6876
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
4323
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3845
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.