Note that there are some explanatory texts on larger screens.

plurals
  1. POCan't get Server Side Includes (one HTML file into another) to work
    primarykey
    data
    text
    <p>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</p> <h2><strong>Setup</strong></h2> <p>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</p> <p><strong>Virtual directory (in httpd-vhosts.conf) is configured as</strong></p> <blockquote> <pre><code>&lt;Directory "c:\www\dev1"&gt; Options Indexes FollowSymLinks Includes ExecCGI AllowOverride All Order allow,deny Allow from all &lt;/Directory&gt; </code></pre> </blockquote> <p><strong>index.html contains</strong></p> <pre><code>A Big Block of Text&lt;br /&gt; A Big Block of Text&lt;br /&gt; &lt;!-- #include file="test.shtml" --&gt; A Big Block of Text&lt;br /&gt; A Big Block of Text&lt;br /&gt; </code></pre> <p><strong>test.shtml contains</strong></p> <pre><code>This is another line </code></pre> <h2>What I am getting</h2> <p><strong>From the browser on my dev machine, www.dev.com/index.html shows</strong> </p> <pre><code>A Big Block of Text&lt;br /&gt; A Big Block of Text&lt;br /&gt; A Big Block of Text&lt;br /&gt; A Big Block of Text&lt;br /&gt; </code></pre> <ul> <li>Page Source shows the !--- include which means the include file hasn't been processed </li> <li>www.dev.com/test.shtml shows the file as indicated above so it is accessible.</li> </ul> <h2>Things I've tried</h2> <p>Read through a bunch of posts both here on stackoverflow and the internet and its helped "build" the basics for getting this to work (ie make sure Options has Includes enabled) but it still isn't working.</p> <p>Changed </p> <pre><code>Options Indexes FollowSymLinks Includes ExecCGI to Options Indexes FollowSymLinks Includes +Include ExecCGI to Options Indexes FollowSymLinks +Includes ExecCGI </code></pre> <p>with an apache restart and it still doesn't work</p> <p>Added .htaccess to the same directory as index.html and test.shtml </p> <pre><code>Options Indexes FollowSymLinks Includes ExecCGI AddType text/html .shtml AddHandler server-parsed .shtml </code></pre> <p>and it still doesn't work.</p> <p>Note. http.conf already has</p> <pre><code>AddType text/html .shtml AddHandler server-parsed .shtml </code></pre> <p>enabled.</p> <p>Yes, it is probably something real obvious but I've got a cold so if somebody could point me in the right direction, that would be greatly appreciated.</p> <h2>More Things I've Tried</h2> <p>Change include file to include virtual</p> <p>I tried the suggestion by RichieHindle and it didn't seem to work and I've modified both my .htaccess and virtual directory configuration to include required combinations of AddType, AddHandler for both .html and .shtml ... still nothing</p> <p>BIG NOTE: On the webserver, one can load a SSI checking webpage (via localhost in one of the xampp install directories) and it tells me that SSI includes are enabled and working, however, please note that my virtual directories are NOT in the xampp install directories; they are standalone under c:/www ... but I can't figure out how/why this makes a difference if I've configured the options outlined above in my virtual directory settings and/or .htaccess settings</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload