Web hosting issues
Author
Discussion

mondeoman

Original Poster:

11,430 posts

297 months

Thursday 3rd December 2009
quotequote all
Is there any valid technical reason for a hosting company not to support SSI's?

My understanding was that SSI's allowed you to have common page items eg menu's so that editing them was an easy task.

If the host co doesn't support them, how else do you have common page items, with out having to edit every single page when you add new pages to main menu's etc?

selwonk

2,143 posts

256 months

Thursday 3rd December 2009
quotequote all
What scripting language are you using? If it's ASP/ASP.net have a look at Server.Execute.

mondeoman

Original Poster:

11,430 posts

297 months

Thursday 3rd December 2009
quotequote all
ummm - dunno smile. I've copied the bulk of the site from one that we own that is hosted by another co, and added the include instruction after doing a bit of research.

Heres some of the code

<tr>
<td style="position:relative; z-index:3; top:-1px">
<!--#include file="/Test Pages/top-menu.shtml" -->
</td>
</tr>

The host has confirmed that they don't support SSI, so the above just gives an error. I tried using .asp and .htm file extensions, no joy.

LivinLaVidaLotus

1,626 posts

232 months

Thursday 3rd December 2009
quotequote all
Odd that a host wouldn't support it these days, but it takes all-sorts. Perhaps ask them why and if they have another server they can put you on that does support SSI.

john_p

7,073 posts

281 months

Thursday 3rd December 2009
quotequote all
If it's not too much hassle, try PHP. It's not too dissimilar in syntax and can do loads more than SSI on its own, which is a bit of an older tech by today's standards.

<?php include("script/index.html");?>

You won't be able to use absolute paths this way, but relative will be fine.

You might need to save it as a .php file

stuart-b

3,651 posts

257 months

Friday 4th December 2009
quotequote all
mondeoman said:
Is there any valid technical reason for a hosting company not to support SSI's?

My understanding was that SSI's allowed you to have common page items eg menu's so that editing them was an easy task.

If the host co doesn't support them, how else do you have common page items, with out having to edit every single page when you add new pages to main menu's etc?
PHP would be a better option for you, rather than the SSI/CGI systems. Things have moved on quite a lot.

Check you have PHP Support (assuming you are apache based and not IIS/Windows)

Create a file: index.php

http://pastebin.com/m5b50dab8 I put the code here because the forum malforms it.

Of course this is the most way of doing it, but it should save you time.

If you use Windows environment, basic ASP is very much the same as the above, but the syntax is different (logic the same).

Edited by stuart-b on Friday 4th December 09:07