I am setting up my first site on my OSX, this is just for use on my machine so I can trial html fragments. When I open my local site and select any HTML file, it comes back as text. My test HTML file is as follows:
<html>
<head>
</head>
<body>
<a>Hello World</a>
</body>
</html>
It is displayed as the actual text rather than the interpretedx text. The actual HTML returned is:
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="1038.36">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Courier}
</style>
</head>
<body>
<p class="p1"><html></p>
<p class="p1"><span class="Apple-converted-space"> </span><head></p>
<p class="p1"><span class="Apple-converted-space"> </span><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></p>
<p class="p1"><span class="Apple-converted-space"> </span></head></p>
<p class="p1"><body></p>
<p class="p1"><span class="Apple-converted-space"> </span><a>Hello World</a></p>
<p class="p1"></body></p>
<p class="p1"></html></p>
</body>
</html>
My apache config for my site is:
<VirtualHost *:80>
ServerAdmin x@x.net.au
DocumentRoot "/Users/X/web_dump/"
ServerName web_dump
ErrorLog /usr/local/logs/web_dump.log
CustomLog /usr/local/logs/web_dump.log common
AddType text/html .html
</VirtualHost>
<Directory "/Users/X/web_dump/">
Options Indexes FollowSymLinks
AllowOverride None
Order allow,deny
Allow from all
AddType text/html .html
</Directory>
And firebug indicates that the page returned is of text/html format:
Date: Wed, 30 Nov 2011 20:10:26 GMT
Server: Apache/2.2.20 (Unix) mod_ssl/2.2.20 OpenSSL/0.9.8r DAV/2
Last-Modified: Wed, 30 Nov 2011 20:10:10 GMT
Etag: "a833cc-3ec-4b2f952a52c80"
Accept-Ranges: bytes
Content-Length: 1004
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Content-Type: text/html
So my really dumb question is: how do I return my HTML file as a HTML file?
BTW: my Apache system is working well for the other applications that I am working on.