Server Side Includes from .htm Pages

Discussion in 'HTML & Website Design' started by travoholic, May 22, 2006.

  1. #1
    Hey guys,

    Not sure if this belongs in the HTML forum but here goes...

    I remember reading something awhile ago when I was first asking about SSI's about being able to use SSI without having to convert files to .shtml. I have a pretty large site that I want to convert to SSI but all the files end in .htm and changing this manually would be a nightmare.

    If anyone can suggest a program that will aid me in changing the .htm to .shtml or some other way to avoid having to do this altogether that'd be great!

    Thanks,
    Kirsty
     
    travoholic, May 22, 2006 IP
  2. Tim_Myth

    Tim_Myth Peon

    Messages:
    741
    Likes Received:
    52
    Best Answers:
    0
    Trophy Points:
    0
    #2
    (Assuming you have Apache)
    Put this line in your htaccess: AddHandler server-parsed .htm

    That will tell your server to parse htm pages for SSI tags. The draw back is that it will parse EVERY htm page for tags, so you will take a small performance hit.
     
    Tim_Myth, May 22, 2006 IP
  3. kk5st

    kk5st Prominent Member

    Messages:
    3,497
    Likes Received:
    376
    Best Answers:
    29
    Trophy Points:
    335
    #3
    You could do that, but it's a not-good idea for the reason stated. A better solution is the set the XBitHack. With XBitHack on, pages with the x bit set will be parsed for ssi. For each page with ssi, do chmod +x.

    cheers,

    gary
     
    kk5st, May 22, 2006 IP