server-side-includes

server-side includes and character encoding

Hi, I created this static website in which each page has the following structure: Common stuff like header, menu, etc. Page specific stuff in main content div Footer In the website linked above all the common stuff was duplicated in each page. In order to improve the maintainability I refactored the pages to use server-side includes...

Why isn't #Include working on .asp page on IIS7?

SYMPTOM: I have Test_virtual.asp with the following: <body>&nbsp; included content starts here: <!--#include virtual="/test_included.txt"--> </body> test_included.txt contains only: This is the included file When I browse to test_virtual.asp, I don't see the included file's text. POSSIBLE CAUSES I found one report that indicat...

Design Tips for PHP Function Include Files

Good design dictates only writing each function once. In PHP I'm doing this by using include files (like Utils.php and Authenticate.php), with the PHP command include_once. However I haven't been able to find any standards or best practices for PHP include files. What would you at StackOverflow suggest? I'm looking for: Naming St...

How do I limit PHP apps to their own directories and their own php.ini?

I am running multiple PHP apps on my Mac, running OS X 10.5.6, Apache 2, PHP 5. I have subdomains setup for each project, a host file entries for each subdomain, and Virtual Directory blocks in the Apache config. So project1.localhost goes to /Library/WebServer/Documents/Project1 project2.localhost goes to /Library/WebServer/Documen...

Apache: SSI inside SSI

Is there a way I can include include files inside include files? (Say that five times fast!) For example: Inside index.html: <!--#include virtual="/include-1.shtml"--> Inside include1.shtml: <!--#include virtual="/include-2.shtml"--> So the tree looks like this: index.html <-- include_1.shtml <-- include_2.shtml As is, this is n...

IIS mod/extension to support eXtended Server-Side Includes (XSSI)?

I've been working with a designer that wants ot bring some content developed on Apache to IIS. The content however makes use of XSSI. I have not been able to find out if IIS can support such things. Perhaps its named something else on Windows/IIS? A sample of this is shown below: <!--#config timefmt="%Y%m%d" --> <!--#if expr="$DATE_LO...

Is there a way of including HTML pages without needing any javascript or server-side code, only HTML

Is there a way of including HTML pages without needing any javascript or server-side code, only HTML. Basically I can't be sure if the server supports server side includes. I don't want to use javascript and I don't want to use any PHP or other server side functionality. Is there any way to do this. At the moment I suspect not, but wou...

Server-side includes in ASP.NET (on Mono, Perhaps): Deprecated?

I have a tiny job to perform on an HTML/ASPX site, and I don't have time to muck around with ASCX (though I've done it before quite a bit, and it is a wonderful technology). My question is: are "classic" ASP server-side includes deprecated in ASP.NET, or merely not recommended? Will they work on Mono? Edit: Yes I have seen this questi...

HTML Include file

I have a basic web application packaged as an EAR deployed on GlassFish. The web module has some html files. The html files have a common footer, an html file, that I would like to extract out and make an include. When I do, and put: <!--#include virtual="insertthisfile.html" --> in an html file, it does not work. Should this work? ...

ASP - Determine if current Script is being run as an include

Lets say I have the following pages: # Include.asp <% Response.Write IsIncluded() & "<br>" %> # Outside.asp <!--#include file="Include.asp" --> I need this to work such that if I access http://Example.com/Include.asp directly, I see "True", yet if I access http://Example.com/Outside.asp I see False. I'd perfer not to have to add an...

HTML Include file

I am using an include file by doing: <!--#include virtual="/includes/leftNav.shtml"--> I changed the include file, and the changes are not picked up. I'm guessing that they will be with a server restart; is it possible to have the changes picked up w/o a restart? ...

Is it possible to have randomness in server-side includes?

I want to introduce some random* behavior into an otherwise static html file. I want to experiment with two different advertising schemes, and I want to have the page erved randomly with either one or the other. It seems like overkill to use a scripting language to generate the whole thing, so I thought SSI would be ideal. I want to d...

Can an include file identify the calling page in classic asp?

I have 2 collections of asp files that are auto generated by a job. Collection 1 has a virtual path of "/collection1/" and collection 2 has a virtual path of "/collection2/". Both collections have the same asp code: <!-- #include file="../SSI/Template.inc" --> Inside Template.inc I have some typical html templating. However, I'd li...

Can't get Server Side Includes (one HTML file into another) to work.

I can't get server side includes to work. I simply want to include one html file into another and I just can't seem to get it working Setup The server is a another machine (not localhost) running Windows XP. I've got a slighly older version of the xampp stack which is running only Apache/2.2.11 Virtual directory (in httpd-vhosts.conf)...

Server side include external HTML?

In my asp.net-mvc application I need to include a page that shows a legacy page. The body of this page is created by calling an existing Perl script. This Perl script is externally hosted. Is there a way to do something like this: <!-- #Include virtual="http://www.example.com/theScript.plx"--&gt; ...

To put the output of a server side script into an HTML file, should you use #include or #exec?

If I want to insert the output of a script into an HTML file using server side includes, is it better to use <!--#include virtual="/cgi-bin/myscript.py" --> or <!--#exec cmd="python /cgi-bin/myscript.py" --> ? ...

Apache: I want to enable SSI. Can anyone furnish an example config file?

Yes - Google abounds with information about configuring Apache to support SSI. But unfortunately, I still cannot seem to get it right. My questions: Can anyone furnish me a full-fledged example config file that enables SSI on an Apache server? Also can you please tell me where I should drop this config file (i.e. which dire...

Server Side Includes on Sun One Web Server 6.1

I have been developing a site using server side includes using Apache as my test server. I am having issues deploying the code to our staging server, which is a Sun One Web Server (6.1). The following ssi snippet seems to not get parsed. Can anyone tell me if Sun One treats the "set var" differently? All of my other tags seem to wor...

Sun ONE Web Server 6.1 Server Parsed HTML

I am wondering what the Sun ONE web server equivalent is for the apache ssi #set var directive. I am looking to set a variable that can later be echoed out. ...

Including HTML fragments in a page - methods?

heya, This is an extension of an earlier questions I asked, here: http://stackoverflow.com/questions/1519198/django-parse-xml-output-as-html-fragments-for-iframe Basically, we're looking at integrating various HTML fragments into a page. We have an small web app generating little fragments for different results/gadgets, at various URL...