0

I have installed Apache 2.2 on windows. I have turned on Includes and my shtml files include their respective html files.

Problem I am having is above each include file are two quotation marks " ".

<body>
<!--#include virtual="/includes/Header.html" -->
</body>

renders

<body>
" " 
html header from include
</body>
Jamie
  • 380
  • 8
  • 19

1 Answers1

0

Possible solutions:

1) Remove the / before includes in <!--#include virtual="/includes/Header.html" -->

2) Supposing that the file which contains the include directives have also the .html extension, and calling your working folder C:/workingfolder, did you set the httpd.conf file as follows?

<Directory "C:/workingfolder">
    Options Indexes FollowSymLinks Includes
    ...
</Directory>

AddType text/html .shtml .html
AddOutputFilter INCLUDES .shtml .html
A_nto2
  • 1,106
  • 7
  • 16
  • I have removed the / and checked my conf and it is setup as above but the quotations are still there. – Jamie Jul 18 '12 at 07:07
  • Strange...I have Apache 2.2 on Windows too...I've had to remove the `/` to have the include working. Try putting the Header.html in the same folder of the calling file and without any `/`. Restart the Apache. I tried that and it worked without any problem. Ah, put something like
    hello!!!
    into the Header.html file, just to try.
    – A_nto2 Jul 18 '12 at 07:14
  • Tried that but still no change. I did view the page in firefox and found it is a space. Chrome adds quotations around the space in their dev tools. However I can't see why I am getting a space above my include files. – Jamie Jul 18 '12 at 18:22
  • As I said on mine that works. I have Apache 2.2.22 installed. You could try to search on google for an example and then try to run it, as last resort. Hope I've helped you in some way – A_nto2 Jul 18 '12 at 18:32
  • @Jamie By the way, ensure that the above is not overridden elsewhere in the httpd.conf file. This should be checked especially if you're using development tools like Mamp, Xampp, etc. Otherwise you should really try with a clean Apache installation. – A_nto2 Jul 22 '12 at 16:37