Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

Coding Forum


You are currently viewing our Coding Forum as a guest. Please register to participate.
Login



Closed Thread
Old 08-16-2010, 09:53 AM SSI Error
Novice Talker

Posts: 13
Name: James
Trades: 0
Hi All,

I have recently added some SSI code into my html and it works perfectly on my homepage however when I try to use it in some sub folders it brings up the error [an error occurred while processing this directive]

I have tried changing the file permissions folder names but nothing seems to do the trick.

The files which I am making the SSI bring up are in a separate folder but again I have moved these around changed file permissons and it makes no difference.

Is there a quick fix to this problem or would it be easier to have all the webpags just in the main folder?

Thanks
James
James87 is offline
View Public Profile
 
 
Register now for full access!
Old 08-16-2010, 10:00 AM Re: SSI Error
LadynRed's Avatar
Defies a Status

Posts: 10,017
Location: Tennessee
Trades: 0
Make sure the path to the include files is correct in all the sub pages. Incorrect path is the usual cause of this type of error.
__________________
Web Goddess & Web Standards Evangelist :) - Tables Be Gone !!

Please login or register to view this content. Registration is FREE


Please login or register to view this content. Registration is FREE

LadynRed is offline
View Public Profile
 
Old 08-16-2010, 10:04 AM Re: SSI Error
Novice Talker

Posts: 13
Name: James
Trades: 0
I simply copied the code im using on the main page which works

<!--#include virtual="header.html" -->

The header.html is located in the main directory for the website so I believe this is the correct file path?!

Thanks
James87 is offline
View Public Profile
 
Old 08-16-2010, 11:57 AM Re: SSI Error
CSM
CSM's Avatar
Front-End Developer

Posts: 297
Name: Michael Pehl
Location: Palma de Mallorca
Trades: 0
If you try to access header.html from a subfolder like /example then you need to write:

Code:
<!--#include virtual="../header.html" -->
Correct me if I am wrong
__________________
Chief Web Officer / Front-End Developer / System Engineer

Please login or register to view this content. Registration is FREE
-
Please login or register to view this content. Registration is FREE
CSM is offline
View Public Profile Visit CSM's homepage!
 
Old 08-16-2010, 02:19 PM Re: SSI Error
chrishirst's Avatar
Missing! presumed drunk.

Posts: 42,371
Name: Chris Hirst
Location: Blackpool. UK
Trades: 0
To use the "virtual" keyword for include directives it needs to be a root relative path

So
Code:
<!--#include virtual="/header.html" -->
is the correct directive to use
__________________
Chris. ->>
Please login or register to view this content. Registration is FREE
<<-

A foolish consistency is the hobgoblin of little minds
Thought for today:- Is SEO the only industry where all the cowboys are Indians?

Last edited by chrishirst; 08-16-2010 at 02:21 PM..
chrishirst is offline
View Public Profile Visit chrishirst's homepage!
 
Closed Thread     « Reply to SSI Error
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.27234 seconds with 12 queries