Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

SSI works in ASP but not HTML and HTM

Status
Not open for further replies.

sciclunam

Programmer
Oct 12, 2002
138
MT
Hi

I have a server side include
<!--#include file="inc_search.html" -->

It works in asp and shtml but not in htm, html and shtm

Is this something my service provider can do?

Links are:

Thanks

Mario

Getting married in Malta?
Visit
 
You have answered your question yourself ! "server-side" include is precisely that.

In technolgies like JSP/ASP/SHTML, the server knows that it must first process the file using the appropriate engine before chucking the resulting html file at the client/browser. But in plain HTML files, the server will just fire them straight to the browser without any pre-processing.
 
Thanks but I have another website where I use include virtual and works fine. I think I had to add some lines in the .htaccess but I am not sure about this.

The .htaccess where ssi works has the following lines

Options Indexes FollowSymLinks Includes
AddType application/x-httpd-cgi .cgi
addType text/x-server-parsed-html .html
AddHandler server-parsed .htm

I think the last 2 lines are doing it.

Getting married in Malta?
Visit
 
Hi mate,

If your site in your signature is the one you are trying to so this on, it's running Apache 1.3.31, so try the following in an htaccess file:

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

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
Hi mate,

Sorry, I can't help with the SSI issue due to the server setup, someone familiar with IIS will be able to help you though:

is running:

Windows 2000
Microsoft-IIS/5.0

Hope this helps

Wullie


The pessimist complains about the wind. The optimist expects it to change. The leader adjusts the sails. - John Maxwell
 
How about Microsoft Documentation?

This is the part explaining how to enable SSI includes:

Follow the 'Setting Application Mappings' link to the next page which should provide you with all the information about how to add new extensions to the list.

Hope it helps.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top