Results 1 to 9 of 9
  1. #1
    Join Date
    Sep 2005
    Location
    The English Lake District
    Posts
    96

    Using SSI on all .html pages

    In the past, I have used a script to build my web pages using a template containing the navigation menus, and separate files with the content. If I changed the navigation, I rebuilt all the pages. It's not a big deal, it takes longer to upload them.

    For a new site, I have made all the .html pages server-parsed, and put the navigation into an include file. I'd like to do this for my other sites, but some advice I've seen suggests that this creates undesirable extra work for the server.

    Which is the best way, building the pages manually, or using SSI?
    Julian Moss
    Tech-Pro.net

  2. #2
    I would preferably build the pages manually without using SSI. But if you need to use SSI it would be best to make the extensions .shtml so you won't have to worry about file permissions. (when SSI code is in a page, the permissions either have to be 755 or the file's extensions has to be .shtml)

  3. #3
    Join Date
    Jan 2005
    Location
    Chicago
    Posts
    226
    SSI doesn't create a big load. I agree on the .shtml extension for all SSI pages though.
    Ken

    CROWHOST hosting+colocation services | 877-CROWHOST | support at crowhost.com
    Independent remote-hands serving all Chicago data centers

  4. #4
    Join Date
    Sep 2005
    Location
    The English Lake District
    Posts
    96
    Quote Originally Posted by CROWHOST
    SSI doesn't create a big load. I agree on the .shtml extension for all SSI pages though.
    If it's an existing site, changing the pages from .html to .shtml will lose all the page rankings though, won't it?
    Julian Moss
    Tech-Pro.net

  5. #5
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    For what you want to do it is definitely a good idea to use database coding. As SSI has pretty much always been known as the 'poor man's database' it is an option worth considering. Server overhead used to be a concern but not anymore. Servers are much more powerful than they used to be.

    Our main site uses 5 - 7 SSI files for every page and works just fine. No load on the Server and zippy parsing. Until one gets very good at working with a database and a front-side connection language, like PHP & mySQL, then stick with using SSI.

    And I would also suggest to avoid using 'shtml' except for Error pages, for the reasons already mentioned.

    As always though, to each their own.
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

  6. #6
    SSI is a great way to add small pieces of information, such as the current time. But if a majority of your page is being generated at the time that it is served, you need to look for some other solution.
    Apache parse files for SSI directives if they have the execute bit set. So, to add SSI directives to an existing page, rather than having to change the file name, you would just need to make the file executable using chmod.

    chmod +x pagename.html

  7. #7
    Join Date
    Sep 2005
    Location
    The English Lake District
    Posts
    96
    My expertise with databases, PHP etc. extends to finding free scripts and if necessary hacking them a little bit. At the moment, I'm really only interested in using SSI to insert a navigation panel on every page.

    On my server, all I did to make .html pages be parsed for SSI was add:

    AddType text/x-server-parsed-html .html

    to the .htaccess file.
    Julian Moss
    Tech-Pro.net

  8. #8
    you can try this also

    AddType text/html .shtml
    AddHandler server-parsed .shtml

  9. #9
    Join Date
    Sep 2000
    Location
    Alberta, Canada
    Posts
    3,109
    If we are delving which directive to use, then IMHO the best to use for SSI includes on 'html' pages is:

    AddHandler server-parsed html << make this the first line in the .htaccess file


    Also, if using SSI is supposed to be detrimental to Server overhead, then what about PHP includes?
    Same thing different language, or as I like to say, "Six of one, half-a-dozen of the other."
    PotentProducts.com - for all your Hosting needs
    Helping people Host, Create and Maintain their Web Site
    ServerAdmin Services also available

Posting Permissions

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