Author |
Topic |
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 07 April 2002 : 06:31:21
|
Hi folks, I have a real dumb question. There isn't a HTML support forum so I am adding it here.
I know I can include files in asp : <!-- #include virtual="somef.ile" --> and this works fine.
I want to do the same in my .htm files. I have tried alot of things but can't seem to find a solution. I know it's something really simple but just can't seem to be able to put my finger on it!
Anyone got any ideas?
|
|
Roland
Advanced Member
Netherlands
9335 Posts |
|
Doug G
Support Moderator
USA
6493 Posts |
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 08 April 2002 : 00:13:23
|
Can't change the file extensions from HTM / HTML to ASP. There has gotta be a way other then that.
I'll check out the link, thank you both for the replies.
|
|
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 08 April 2002 : 00:20:11
|
I went through the link, everything I'm doing is fine according to the information there. The description on the link is mainly for Unix based servers, I wonder why the same does not work with NT ones.
Bottom line is, am still stuck with the problem.
|
|
|
Bunce
New Member
Australia
84 Posts |
Posted - 08 April 2002 : 00:55:29
|
Have you ensured that SSI is enabled on the server?
Are you using an extension that the server is configured to recognise as an include file (eg .shtml)? (IIS Manager -> Default Web Site -> Properties -> Home Directory -> Configuration)
Andrew
====================================================== There have been many, many forum posts made throughout the world... This was one of them!
Edited by - Bunce on 08 April 2002 00:58:52 |
|
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 08 April 2002 : 05:17:32
|
Yup it had SHTML there. I have added .inc to it, with the same dll reference.
From what I understand is if I have a file called footer.inc and I want it to appear on the page default.htm, I have to have the .inc extension configured the way you had said. If that's the case then it should work fine.
I have even added .htm & .html extensions there. Sadly, it still does not solve the problem.
Edited by - Man[0]waR on 08 April 2002 05:51:39 |
|
|
Bunce
New Member
Australia
84 Posts |
Posted - 08 April 2002 : 05:54:55
|
Hmm, did you make sure that it was set to be processed by the sslinc.dll file?
Can't think of anything else.. perhaps show us the code you are using?
Cheers,
Andrew
====================================================== There have been many, many forum posts made throughout the world... This was one of them! |
|
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 08 April 2002 : 07:13:36
|
Yup, they are set to that dll file. Here's the code, not much to it really:
<!-- #include virtual="incl.inc" -->
|
|
|
Bunce
New Member
Australia
84 Posts |
Posted - 09 April 2002 : 00:35:04
|
And whats the error you are receiving? Are you running it from an ASP file or a HTML file?
====================================================== There have been many, many forum posts made throughout the world... This was one of them! |
|
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 09 April 2002 : 00:45:58
|
Am using it in HTML files, it works like a charm with ASP pages. In the HTML files I get no errors. It just does not show the contents of the included file. As if the include statement isn't there.
|
|
|
snaayk
Senior Member
USA
1061 Posts |
Posted - 09 April 2002 : 13:01:07
|
I think I had reda something somewhere that the page must be .shtml to process any include files. I didn't read the above article so that may have covered, just a thought.
|
|
|
ruirib
Snitz Forums Admin
Portugal
26364 Posts |
Posted - 09 April 2002 : 13:33:38
|
As snaayk said I don't think you can use includes in HTML files. Also the page in that link Doug posted explicitly says that they use .shtml files to be able to include other files.
------------------------------------------------- Installation Guide | Do's and Dont's | MODs |
|
|
Man[0]War
Starting Member
United Arab Emirates
40 Posts |
Posted - 10 April 2002 : 00:44:39
|
Thank you all for your helpful comments.
I got it to work , just like what Bunce said. You have to configure IIS to be able allow include files in HTML pages. I had done that but I guess you need to restart the server to get it to work. And it works !!
The reason why I couldn't rename the files was coz, I almost 3GB of html files that needed the include file, I didn't want to rename the files and redo the links and so on.
I found out the reason why HTML files do not have the include 'activated' is coz it takes longer for IIS to process it. So to improve on performance they have other extensions like SHTM and so on to do the includes.
|
|
|
|
Topic |
|