Web Hosting Talk







View Full Version : SSI ?


Shooter
10-19-2000, 03:05 PM
OK, I'm still having problems getting SSIs to work. I'm sure I'm making a simple, fundamental error. This is what I'm including in the index.html source:

<!--#include virtual="footer.shtm" -->

I obviously have a footer.shtm file with the text that I want inserted (without HTML, BODY, etc tags). I have enabled SSI in Plesk (verified in the httpsd.conf file as "+Includes". I have also tried to include it as "footer.html" and "footer.txt" as well. What is the *correct* way to do this???

Thanx!
Wm

jtan15
10-19-2000, 03:37 PM
Well, unless you specify that .html files can be SSI's, I'm pretty sure it won't work. Try renaming it to .shtml, or adding this to your httpd.conf/.htaccess file:

AddType text/x-server-parsed-html .html

Hope this helps. :)

Shooter
10-19-2000, 03:49 PM
I found a /plesk/apache/conf/httpsd.conf file, but no httpd.conf/.htaccess. Found this section of httpsd.conf:

UserDir .

<Directory /*/public_html>
AllowOveride AuthConfig Limit Indexes Options
Options ExecCGI
</Directory>

DirectoryIndex index.htm index.php3 index.php index.shtml index.html

AccessFileName .htaccess

[Added your line here]

<Files ~ "^\.ht"
Order allow,deny
Deny from all
</Files>


Does that look right?
Wm

Website Rob
10-19-2000, 04:51 PM
Your Server is already setup for .shtm file, what you need to do is change how you call the file.

eg.
<!--#include virtual="footer.shtm" --> change to <!--#include virtual="footer.htm" --> or footer.txt

then for whatever page this is included on, change the extenstion of "that" page to .shtm.

Although you can call a file that is .txt, any HTML within that file will operate as HTML.

Shooter
10-24-2000, 04:26 PM
I changed all my files to *.shtml and voilą! It works fine now!
Thanx all!
Wm