Questions tagged [server-side-includes]

Server Side Includes (SSI) is a simple interpreted server-side scripting language used almost exclusively for the Web. The most frequent use of SSI is to include the contents of one or more files into a web page on a web server.

References

53 questions
12
votes
1 answer

SSI includes not working on Debian with Apache

I'm trying to get SSI to work on Debian running Apache, however the .shtml files are not being parsed. From a PHP file with phpinfo() I can see that the following show up in the loaded modules section: mod_mime_xattr mod_mime mod_mime_magic In…
Mike
  • 689
6
votes
1 answer

Environment variables not available on server after mod_rewrite, but works locally

I am working on a site where I am using SSI to set a variable on an HTML page that gets parsed and the variable is then to be picked up by a script after a mod_rewrite rewrite. This works on my local setup, but for some reason it doesn't on the…
5
votes
3 answers

How do I conditionally handle undefined SSI variables using Apache?

I want to include a header in a bunch of pages, like so: header.html: My site To enable a page-specific title, I'm trying to use an SSI variable that I set in each page: page1.html: When I view test.html live in my browser, myFile.html is being…
Sparky
  • 141
  • 1
  • 6
3
votes
2 answers

How can I get Apache2 to serve up .shtml files as Content-Type "text/html" and not "text.html"?

I'm working on a website, implemented as shtml, and when I try to load the home page (http://simplyclassicremodeling.com) from IE8, it says it can't open the file because it transferred as Content-Type "text.html". The page loads fine from Chrome,…
Christos Hayward
  • 1,180
  • 3
  • 16
  • 39
3
votes
1 answer

Is it ok to map the SSI handler to .html files in IIS?

I have a site built with static html files and I need to add a segment of markup to every page. The natural choice to accomplish this is to use server-side includes (SSI). The SSI handler does not map to .html files by default, so I'm left with 2…
2
votes
1 answer

nginx SSI: how to echo html?

As a sanity test, at the head of my HTML page, I'm trying to do a very simple SSI echo to indicate to the browser that SSI is working: index.html: Unfortunately this gives me an error: [an error occurred while processing this directive] In the logfiles it says unknown…
umläute
  • 541
2
votes
2 answers

DBD: Can't load driver file apr_dbd_mysql.so

I am using Apache 2 on a virtual machine running a LAMP stack (mysql version 5.6). When I try to restart the server I am getting this error; DBD: Can't load driver file apr_dbd_mysql.so I have made sure that the apr_dbd_mysql.so file is inside the…
2
votes
1 answer

NGINX SSI Not working

I'm having trouble getting SSI to work on NGINX. You can see the problem if you hit http://www.bakerycamp.com/test.shtml. Here is the contents of that file: If you hit this in a browser, you see the SSI directive in the content…
Mike Kelly
  • 169
  • 3
  • 10
2
votes
1 answer

How to include PHP file from a Virtual Directory on IIS?

I would like to know if there is a way to include PHP files from Virtual Directory to a PHP file in site's root. For example I have siteroot: siteroot\index.php siteroot\other.php and a separate userconfig dir, containing client's individual…
Slava
  • 201
1
2 3 4