Click to See Complete Forum and Search --> : Include file=footer.inc in html is possible?


sathysudha
06-14-2003, 07:06 AM
Friends

I try to include the .inc file in my .html file but its not working.
i gone thru some threads here.
All are telling to use .shtml, .shtm or asp.
is it possible to use in .html file.
if yes, kindly tell me the procedure for that.
someone is telling about SSI.
what is SSI? if i enables SSI then, can i include the .inc in the .html file?

thanks
sudhakar

sathysudha
06-14-2003, 07:36 AM
pal

my doubt is
can i include the .inc in html?
if yes, how can i?

thanks

Charles
06-14-2003, 07:37 AM
I've been told by a certain server administrator (and only once I asked why my includes suddenly stopped working) that with the Apache server <!--#include file="filename.ext" --> has been depricated for security reasons and in favor of <!--#include virtual="filename.ext" --> And the nifty thing about the second one is that you can include the output from scripts. for Apache SSI details see http://httpd.apache.org/docs/mod/mod_include.html.

Charles
06-14-2003, 07:39 AM
Originally posted by sathysudha
pal

my doubt is
can i include the .inc in html?
if yes, how can i?

thanks It has to be done at the server and there are lots of ways but they depend upon the server. What server are you using and what scripting do you have available? SSI, Perl PHP, XSLT?

sathysudha
06-14-2003, 07:45 AM
Im in Windows

IIS 5.0
ASP
VbScript

Can i include the .inc file in .html file?

sathysudha
06-14-2003, 07:53 AM
This is the one im having in footer.inc

<table cellspacing="0" cellpadding="3" border="0" width="100%" style="border-top: 1px #000 solid;">
<tr>
<td align="center" bgcolor="#b9d8e2">
<p>
<a href="">Copyright &copy; Nahil
Computers</a> <br>
<a href="home.html">Home</a> |
<a href="about.html" >About us</a>
| <a href="partners.html" >Partners</a>|
<a href="jobs.html" >Jobs</a> |
<a href="feedback.html" >Feedback</a> |
<a href="contact.html" >Contact us</a>
</p>
</td>
</tr>
</table>

so how can i include this one in all the page as footer.inc

sathysudha
06-14-2003, 07:59 AM
see im having some 10 or 15 .html pages.
in all the pages i have to include the footer.inc
so i have to change all my .html to .shtm or shtml?
by the way, whats the diff bet. html and shtml?

sathysudha
06-14-2003, 08:10 AM
so nothing will happen is it?
can i proceed in converting the .html to .shtm or .shtml?

sathysudha
06-14-2003, 08:16 AM
ok

Thanks for your kind help with patience

jeffmott
06-14-2003, 02:20 PM
If you don't wish to rename all the extensions, and change all the page links, and form actions, etc., and your server is Apache then you can create a .htaccess configuration file with the followingAddHandler server-parsed .shtml .shtm .html .htm

Charles
06-14-2003, 02:59 PM
Originally posted by jeffmott
If you don't wish to rename all the extensions, and change all the page links, and form actions, etc., and your server is Apache then you can create a .htaccess configuration file with the followingAddHandler server-parsed .shtml .shtm .html .htm But see http://httpd.apache.org/docs/howto/ssi.html#configuringyourservertopermitssi for why you shouldn't let the server parse .html and .htm files and why you should use the XBitHack directive instead.

jeffmott
06-14-2003, 03:45 PM
Apache
You'll occasionally see people recommending that you just tell Apache to parse all .html files for SSI, so that you don't have to mess with .shtml file names. These folks have perhaps not heard about XBitHack....and they were right. :)
thanks for the correction.

the only downfall...Apache
Of course, on Windows, there is no such thing as an execute bit to set, so that limits your options a little.but since the majority of servers are unix based, this won't be a common problem.