Results 1 to 4 of 4

Thread: Server Side Include Problem

  1. #1
    Join Date
    Mar 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Server Side Include Problem

    I'm trying to insert my logo, a tagline and a small navigation bar in the branding section of my home page using Server Side Includes but its not working. All that's displaying is a big white space where everything should be. The branding section is at the very top of the home page and is sometimes referred to as the header section.

    To see the problem please visit the following URL:

    www.gochecksite.com

    My file structure is as follows and I've listed the folders and files "in the exact order" when I open my public_html folder when uploading files to my server:

    cgi-bin folder

    css folder

    images folder

    include folder (contains my branding.html file that I'm trying to insert using Server Side Includes)

    .htaccess file

    eng-benefits.html file

    index.html file

    Below is the code on my home page that I'm using to insert the Server Side Includes:

    <div id="branding">
    <!--#include virtual="include/branding.html" -->
    </div>

    Below is the contents of my branding.html file:

    <a href="index.html"><img class="positionlogo" src="images/logo.gif" alt="" /></a>

    <img class="brandingtagline" src="images/brandingtagline.gif" alt="" />

    <div class="brandinglinks">
    <ul>
    <li><a href="#">English</a></li>
    <li><a href="#">French</a></li>
    <li><a href="#">Spanish</a></li>
    <li><a href="#">Russian</a></li>
    <li><a href="#">Chinese</a></li>
    </ul>
    </div>


    What do I have to do to get the Server Side Includes working so it inserts the contents of my branding.html file?

  2. #2
    Join Date
    Mar 2007
    Posts
    25
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    My Server Side Includes problem has been resolved. I had to adjust my .htaccess file by adding "AddHandler server-parsed .html". Now everything works just fine.

  3. #3
    Join Date
    Dec 2006
    Location
    Texas
    Posts
    38
    Thanks
    10
    Thanked 0 Times in 0 Posts

    Default your site

    Brayd,

    Is every page in your site .shtml? If so please read my post a couple of lines under yours. My index page works great with 3 includes but link pages will not display.


    JIM

  4. #4
    Join Date
    Mar 2005
    Location
    SE PA USA
    Posts
    29,126
    Thanks
    44
    Thanked 3,228 Times in 3,189 Posts
    Blog Entries
    12

    Default

    With includes things can get tricky. Paths on the included page will be relative to the page(s) that they are included on. For this reason it is best to use absolute paths on pages that will be included on other pages.
    - John
    ________________________

    Show Additional Thanks: International Rescue Committee - Donate or: The Ocean Conservancy - Donate or: PayPal - Donate

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •