/    Sign up×
Community /Pin to ProfileBookmark

Simple Server Side Include

Hi guys,
We have a very simple web site that I am trying to update add more pages etc and for this I want to use a simple DHTML menu that is on my navigation page and call this up for each page so I only have one file to worry about when adding menu items etc. Easy eh? I would have thought so as I have done this before on a previous site using PHP include.

The current site I’m working on is HTML only so I am trying to use either

<!–#include virtual=”NavigationNavpage.html” –>
or
<!–#include file =”NavigationNavpage.html” –>

Neither of these seem to work when the called file (Navpage) is is a seperate directory. I can get it to work if I put the calling page into the same folder as the called page.

It seems to be an adress problem as I am getting this error when the page is served – [an error occurred while processing this directive].

I have tried all variations of / and and ..

The calling page is SHTML and I have modded the .htaccess file thus

[QUOTE]

DirectoryIndex index.shtml index.html
AddType text/html .shtml
AddHandler server-parsed .shtml
Options Indexes FollowSymLinks Includes

[/QUOTE]

Can someone call me stupid and point out where I have missed the full stop?

It has been known for me to spend a week trying to get a page to serve when all I had to do was chanhe a capitalisation :eek::eek::eek:

Thanks in advance.

to post a comment
HTML

7 Comments(s)

Copy linkTweet thisAlerts:
@WyCnetFeb 11.2012 — <!--#include virtual="Navigation/Navpage.html" -->

or

<!--#include file ="Navigation/Navpage.html" --> [/QUOTE]

I think you were using backslash, and not slash?
Copy linkTweet thisAlerts:
@UbatoidauthorFeb 11.2012 — I think you were using backslash, and not slash?[/QUOTE]

I've tried both / and .
Copy linkTweet thisAlerts:
@WyCnetFeb 11.2012 — You can try an inline frame(iframe), with the source (src="this-file") to comply with HTML.
Copy linkTweet thisAlerts:
@UbatoidauthorFeb 12.2012 — Thanks for the suggestions, but I really wanted to use the include, plus the fact I hate the that I dont know why its not working:mad::mad:

This has got to be simple..
Copy linkTweet thisAlerts:
@Major_PayneFeb 12.2012 — Enabling .shtml extentions:

In the .htaccess file for your website, place the following code:

AddType text/html .shtml

AddHandler server-parsed .shtml

File in different directory (Leave off the folder name):

<!--#include virtual="/filename" -->


File in same directory (Leave off the folder name):

<!--#include file="filename" -->

Since your Navpage.html is in its own folder for all pages, you'll use the SSI for different directory on all pages.
Copy linkTweet thisAlerts:
@UbatoidauthorFeb 12.2012 — Enabling .shtml extentions:

In the .htaccess file for your website, place the following code:

AddType text/html .shtml

AddHandler server-parsed .shtml

File in different directory (Leave off the folder name):

<!--#include virtual="/filename" -->


File in same directory (Leave off the folder name):

<!--#include file="filename" -->

Since your Navpage.html is in its own folder for all pages, you'll use the SSI for different directory on all pages.[/QUOTE]


Check ! done all the above, still no go......

most bizzare !
Copy linkTweet thisAlerts:
@welshFeb 13.2012 — Check the Apache Error and Access logs to see what they say?
×

Success!

Help @Ubatoid spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 5.18,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @AriseFacilitySolutions09,
tipped: article
amount: 1000 SATS,

tipper: @Yussuf4331,
tipped: article
amount: 1000 SATS,

tipper: @darkwebsites540,
tipped: article
amount: 10 SATS,
)...