Skip to main content

Forums

  • This topic is empty.
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #22722
    bboypkj
    Participant

    Hi guys,

    I was watching one of the mockup-to-website videos and the CSS-tricks dev said for the menu’s it’d be best to use an "include" command in order to not have the same code on every page.

    I’m building my site locally on my computer right now and have tried to research this myself. I moved my menu code from my html file into a file called "menu.ssi".

    the code i put into my HTML document is: <!–#include virtual="menu.ssi"–>

    I’ve also saved the html file as a .shtml file and have both files in the same directory. I’ve created a file called htaccess.txt and have these lines of code in it and have saved it in the same directory as the others:

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

    However, it is not loading the content from menu.ssi at all.

    What am i doing wrong?

    #47664
    box
    Member

    This reply has been reported for inappropriate content.

    Have you checked that Server Side Includes has been enabled on your server?

    #47669
    bboypkj
    Participant

    i’m creating the sign locally on my pc before uploading to the server
    is there anything locally that i can set to enable ssi?

    #47670
    box
    Member

    This reply has been reported for inappropriate content.

    the htaccess should do it (assuming its an apache server) but you shouldn’t have called it htaccess.txt, it should be named .htaccess.

    #47671
    bboypkj
    Participant

    windows doesn’t allow me to name the file ".htaccess", an extension with no file name
    am i missing something? it’s a windows 2000 server

    #47672
    box
    Member

    This reply has been reported for inappropriate content.

    OK, for win2k server using iis web server you can’t use .htaccess. Instead you either give your files an .asp extension, or follow the steps on this forum where the question has been answered. Google is your friend in these instances ;)

Viewing 6 posts - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.
icon-link icon-logo-star icon-search icon-star