Virgin Webspage and SSI

Soldato
Joined
17 Jan 2006
Posts
2,890
Location
Dundee
I have a small webiste located in my VM Websapce which makes use of a drop down menu system. EAch time I update one option on the website I need to change every page in the website (around 30).

I was hoping to use Server Side Includes to simply add an instruction to each to each page to load the menu then the current apge.

No matter what I do I cant get it working. Does anyone here use SSI on VM space?

Would love some help, on this.

Cheers


BTW Website site is My Website
 
Last edited:
If the web space supports SSI, you would probably have to give files that you want to be server parsed the file extension .shtml
 
If the web space supports SSI, you would probably have to give files that you want to be server parsed the file extension .shtml


Do you mean the files all have be named .shtml or jus tthe menu one i want to incorporate ?

EDIT : VM does support SSI
 
Last edited:
If you want to include the menu on a page with SSI e.g.

<!--#include file="menu.htm" -->

The page calling the menu must be server parsed. Most servers won't parse .html by default, but will parse .shtml
 
So if it run the following :

-------------------

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">

<head>
<title>.: Whitfield Sports Bar Pool Team Dundee :. ABOUT US</title>
<meta http-equiv="Content-type" content="text/html; charset=utf-8" />
<meta name="keywords" content="Whitfield Pool Team, Pool Team, Dundee, Whitfield Sports Bar, Tuesday Pool League, Dundee Clubs Pool Leagu" />
<meta name="description" content="Whitfield Sports Bar Pool Team" />
<meta name="author" content="Graeme Lawrence, www.cnsdundee.co.uk" />

<link rel="stylesheet" type="text/css" href="css/style.css" />
<script type="text/javascript" src="chromejs/chrome.js">
/***********************************************
* Chrome CSS Drop Down Menu- � Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>
</head>

<body>

<!--Div for Logo - must remain as is -->

<div id="head">
<h1></h1>
</div>

<!-- Menu To Be Copied From Here -->

<!-- News Marquee -->

<FONT color="#ffffff" size="+1">
<MARQUEE bgcolor="green" direction="left" loop="20">
<STRONG>LATEST NEWS :... </STRONG>Whitfield SB Lose pre-season Friendly 7-5 to Tivoli Tigers&nbsp;&nbsp;&nbsp;
<STRONG>NEXT MATCH :... </STRONG>League Match 1 v Fairmuir &#40Away&#41 9 Sep 2008&nbsp;&nbsp;&nbsp;
<STRONG>LEAGUE NEWS :... </STRONG>League Programme Can Be Found On The Fixtures Menu
</MARQUEE>
</font>

<!--Menu List -->

<!--#include file="menu.htm" -->

------------------------------------

THis will load paghe menu.htm.

All the other pages need to be saves as .shtml ?

Will Try it cheers
 
Last edited:
Gave up on it... for today.

The SSI just seems not to work at all in the space.

Might buy some decent webspace that runs cold fusion. So much easier to work with.

Thanks for help so far.
 
You need to make the page containing any SSI server parsed. Add this to your htaccess file in the directory or the appropriate place in httpd.conf if you have access to it. Rename the page to .shtml

Code:
Options +Includes
AddType text/html .html
AddHandler server-parsed .shtml
 
Last edited:
Thanks for this Ladforce, but I just cant seem to get it working. Its is a bit different now now, part of the menu is showing.

Where I get confused is the head/body section. Does the file I'm in looking to include have to have the head/body/html tages or can it be plain html code?

In firefox it finds the file (menutest.shtml) but in IE 7 I get a 404 error.

Surely it cant be that difficult?

Perhap's I'm a bit thick !!

Cheers for help

EDIT :

THe file I am using to test is www.glweb.myby.co.uk/pool/menutest.html

The file I am calling into the above page is www.glweb.myby.co.uk/pool/menu.html

I have tested the menu.html file and it loads fine in the browser.

Perhaps you could look at the code and let me know.

Cheers again.
 
Last edited:
include it as /menu.html. or if that doesnt work include it using <!--#include virtual="/menu.html" -->. It doesnt need any headers or head/body, just html or a script if youve set it up to handle it.

edit: you havent closed the quotes surrounding the string either and the syntax is incorrect for an include -> on your site it is <!--#include="www.glweb.myby.co.uk/pool/menu.html-->

edit2: sorry i meant menu.html in the first line of my post
 
Last edited:
Me again. Pages do not load when using the .shtml extension. (Open with in Firfox and 404 error in IE)


Everything loads ok using .html so i have renamed files to that to see if they load.
 
They may have already set server parsed on all html files then. Yea give it a go and see if that works. Just make sure you fix the include statement :)
 
What have i got wrong with the include statement. Check the VM site they say all ssi paegs must be named .shtml.

EDIT: I have seen that that I have .htaccess files in the roort plus alos in various other folders such as "_vti_bin" and so on.

Do I have to edit them all?
 
Last edited:
this <!--#include virtual="/pool/menu.html--> should be <!--#include virtual="/pool/menu.html"-->

edit: you just need to edit the htaccess file in the directory where the file doing the including is located. Also, if you want to use .html extensions for files with includes, you will need to add AddHandler server-parsed .html to it or nothing will be included.
 
Last edited:
fixed that but still nowt.

EDIT: I have 3 sites within my space. The one I'm wokring on runs in a directroy called 'pool'. I take it I have to add and .htaccess file to this directory?

EDIT 2: Added the .htaccess file to the root of the 'pool' directory and set .shtml and .html both to be parsed, but no joy.
 
Last edited:
yep thats right. in the root where the file which has an include inside it is. Copt the example I gave at the top of this thread but change the server-parsed to .html as you arent using an .shtml file.
 
THis is what my .htaccess file looks like

# -FrontPage-

IndexIgnore .htaccess */.??* *~ *# */HEADER* */README* */_vti*

<Limit GET POST>
order deny,allow
deny from all
allow from all
</Limit>
<Limit PUT DELETE>
order deny,allow
deny from all
</Limit>
AuthName pwp-admin2
AuthUserFile /pwp/tier-1/pwpstore2/17/glweb/htdocs/_vti_pvt/service.pwd
AuthGroupFile /pwp/tier-1/pwpstore2/17/glweb/htdocs/_vti_pvt/service.grp

Options +Includes
AddType text/html .shtml
AddHandler server-parsed .shtml
AddHandler server-parsed .html

I was think of moving all the files in my webspace and re-setting the whole lot and removing frontpage extensions, do you reckon with might help it.
 
Even with that .htaccess, the file wont load in ie with a .shtml extension? Maybe they dont allow you to use addhandler etc. It might all be configured for you in their apache config as they do say you need to call it .shtml in their help page. Have you tried just including the file when its called .shtml with the last 4 lines of that htaccess file deleted?
 
Back
Top Bottom