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

48 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
  • 669
  • 2
  • 9
  • 25
5
votes
0 answers

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,152
  • 3
  • 15
  • 35
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…
Josh Kodroff
  • 551
  • 3
  • 7
  • 13
2
votes
2 answers

getting SSI's `exec` to work with apache

so i have an apache-2.4.25 (as packaged in Debian/stretch), and would like to use SSI's exec method. Unfortunately this gives me an error: [an error occurred while processing this directive] In the logfiles it says unknown…
umläute
  • 469
  • 1
  • 7
  • 26
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
  • 3
  • 11
2
votes
1 answer

Unable to SSI include some CGI scripts

I have a page site.shtml on an Apache server in which I am trying to include a few CGI scripts, like so:

ssube
  • 164
  • 1
  • 1
  • 10
2
votes
2 answers

nginx proxy caching and ssi

I am using nginx for caching requests from the upstream apache server, however I want few blocks inside to be fetched from apache all the time. I am hoping ssi can do this, but the SSI tags are outputted to the user without being preprocessed. …
digitalPBK
  • 121
  • 4
2
votes
1 answer

Why does my SetEnvIfNoCase directive does not match requested URI?

I'm attempting to set up Apache such that various error pages display with headers/footers appropriate to the context of the error. If the user was requesting a corporate page, I want to show the error with the corporate look and feel. If the error…
vezult
  • 400
  • 2
  • 5
  • 14
1
2 3 4