#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Jun 2013
    Posts
    15
    Rep Power
    0

    Using Server Side Includes w/HTML


    Greetings, all! New guy here...

    I have a site that I built about 5 years ago, and I used Server Side Includes in it - just .inc files with html, css, javascript, etc. At the time I was under the impression that SSIs could be used in shtml files. The problem at that time was that my client wanted the home page to load by typing just the domain name, without typing "domain.com/index.shtml". Should have been an easy task, but their server was not set up to use a .shtml file as the entry file. I tried to get the server guys to enable that, but they couldn't understand the whole htaccess thing. Didn't seem complicated, but websites weren't their top priority, so they didn't really care to understand. I finally gave up and just used 'default.asp' as the entry page though the site didn't have any asp coding in it at that time, because it would allow SSIs.

    I'm re-coding the site now to use as a work sample on my portfolio site, and my laptop doesn't have IIS installed and I don't have an installation CD to install it from, therefore I can't view local asp files in my browsers. I've been uploading the files to my domain to test them, but my web host is getting flaky and I can't access their file manager.

    So I'm trying to come up with a way to work the site locally, and thought I'd try renaming the default.asp file to default.shtml - Now I find that the SSIs aren't working in the shtml file

    Am I missing something, or am I mistaken about using SSIs with shtml files?

    Thanks,

    joe
  2. #2
  3. No Profile Picture
    Lost in code
    Devshed Supreme Being (6500+ posts)

    Join Date
    Dec 2004
    Posts
    8,317
    Rep Power
    7170
    Service Side Includes are handled by the server (hence the name), so if you open the file directly in the browser without requesting it from an actual server they aren't going to be processed.

    You can install Apache and use that instead of IIS.

    You might also consider using something other than SSI, like PHP. Use of SSI is actually a lot rarer, so you're less likely to find support when using it.
    PHP FAQ

    Originally Posted by Spad
    Ah USB, the only rectangular connector where you have to make 3 attempts before you get it the right way around

IMN logo majestic logo threadwatch logo seochat tools logo