PDA

View Full Version : How to do server-side includes on Westhost?



dallasag
02-01-2011, 01:37 PM
I'm missing something basic here, I think.

Contents of http://www.dawgagility.org/ssitest.html (hosted by Westhost):


<html>
<head>
<meta name="editor" content="/usr/bin/vi">
<title>SSI test
</title>
</head>
<body bgcolor="blue">

<p>
Date and time:
<!--#echo var="DATE_LOCAL" -->

<p>
Include virtual:<br>
<!--#include virtual="SSI/foo.shtml" -->

</body>
</html>

Contents of http://www.dawgagility.org/SSI/foo.shtml:


This text included via SSI 'include virtual'

But as you can see by clicking on http://www.dawgagility.org/ssitest.html there is no SSI processing done. The identical code works in my private account, though: http://www.panix.com/~mshaw/ssitest.html

Is there some configuration step I'm missing? cPanel indicates that Apache should already be set up to handle .shtml.

I also doublechecked the file permissions, and they're fine (ssitest.html is 644, SSI/ is 755, foo.shtml is 644).

Thanks for any help....

wildjokerdesign
02-01-2011, 03:34 PM
extenstion should be .shtml on the file you want to include another one on not the other way around. In other words rename ssitest.html to ssitest.shtml and foo.shtml to foo.html. Actually it really does not matter if the foo is html or shtml extension really. :) You can add a handler via cPanel if you want .html files to be parsed. I can't remember specifics of navigation in cPanel of the top of my head but you would set up a new handler for .html that is server-parsed.

dallasag
02-01-2011, 03:37 PM
extenstion should be .shtml on the file you want to include another one on not the other way around. In other words rename ssitest.html to ssitest.shtml and foo.shtml to foo.html. Actually it really does not matter if the foo is html or shtml extension really. :) You can add a handler via cPanel if you want .html files to be parsed. I can't remember specifics of navigation in cPanel of the top of my head but you would set up a new handler for .html that is server-parsed.

Ha! That did it - thanks so much.

wildjokerdesign
02-01-2011, 03:37 PM
Here we go.... found the cPanel document page on adding an Apache Handler. http://docs.cpanel.net/twiki/bin/view/11_25/CpanelDocs/ApacheHandlers