Server-Side Includes

design

#1

Hello everyone,

I’ve been doing websites for a few years now, but never really started my own until recently. I’ve always managed a site with what was given to me as opposed to starting one from scratch…

Well I finally started my own and I have a section of my site in which I want to have the exact same thing on all 10 pages, but I want to be able to edit that part from one file if I need to. So I used the
<!–#include file=“mapcont.txt” --> command. (ignore underscores…)

Doesn’t work on my site… and I have no idea why. Do I have to enable SSI on dreamhost somehow? Any help would be greatly appreciated.


#2

Any web pages that use SSI must have the file extension of .shtml (see wiki article).


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#3

Wow… That’s all it was. Thanks for the fast reply!

I’m assuming that’s a server-side option? Because I have another website that’s hosted by the company who designed the site for us and their regular .html files can have SSI’s.


#4

That is correct. I believe you may be able to force this to work on pages with the extensions of .html and .htm by adding the following line to your .htaccess file, but I have not tried it myself:AddType text/x-server-parsed-html .html .htm--------
si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#5

That wouldn’t be something that goes against DH’s Terms & Conditions?


#6

Nope. Perfectly okay.


si-blog | Keystone Websites
Save $97 on yearly plans with promo code [color=#CC0000]SCJESSEY97[/color]


#7

Nice! I’ll give it a shot! But for now, I did get the SSI working on the index page.

www.rentpaulpaon.com/weather

Did a little reverse engineering to weather.com… I was fair about it and made the weatherchannel logo a link to their site. And yes, I did all that and I couldn’t figure out the SSI. Haha.

there’s a 9-section image map that can bring you closer to each part of the US. Just practicing, that’s all. Website is currently set to a rating of “Crap” because I haven’t spent a lot of time on it.

Thanks for all your help!