Under the domain publicpen.com I've several dozen sites in
subdiretories, such as www.publicpen.com/honenbeger. I've no trouble
with any of these sites. But under one, which I put in yesterday,
www.publicpen.com/staengl, when I point my browser there, the browser,
instead of showing me the index.htm pages like it should, it instead
tries to download it as an object. Why?
Below are the contents of index.htm. Does anyone see anythging wrong
here?
<html>
<head>
<title>Staengl Engineering: Energy Efficient Design</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<!-- Fireworks MX Dreamweaver MX target. Created Tue Feb 17 00:36:21
GMT-0500 (Eastern Standard Time) 2004-->
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
> Under the domain publicpen.com I've several dozen sites in
> subdiretories, such as www.publicpen.com/honenbeger. I've no trouble
> with any of these sites. But under one, which I put in yesterday,
> www.publicpen.com/staengl, when I point my browser there, the browser,
> instead of showing me the index.htm pages like it should, it instead
> tries to download it as an object. Why?
Because http://www.publicpen.com/staengl/ is sent with
Content-Type: application/x-php
and most browsers don't know what to do with that, and most browsers are
configured to ask the user to save unknown file types.
--
Darin McGrew, mcgrew@stanfordalumni.org, http://www.rahul.net/mcgrew/ Web Design Group, darin@htmlhelp.com, http://www.HTMLHelp.com/
"FAILURE IS NOT AN OPTION. It comes bundled with the software."
Posted by lawrence on July 30, 2004, 11:09 pm
Please log in for more thread options
> > Under the domain publicpen.com I've several dozen sites in
> > subdiretories, such as www.publicpen.com/honenbeger. I've no trouble
> > with any of these sites. But under one, which I put in yesterday,
> > www.publicpen.com/staengl, when I point my browser there, the browser,
> > instead of showing me the index.htm pages like it should, it instead
> > tries to download it as an object. Why?
>
> Because http://www.publicpen.com/staengl/ is sent with
>
> Content-Type: application/x-php
>
> and most browsers don't know what to do with that, and most browsers are
> configured to ask the user to save unknown file types.
Wow, I never would have caught that. It's interesting, I've lost money
every single time I've tried to port someone else's site. I charge for
2 hours, which I assume is excessive because, after all, how hard can
it be to move a bunch of static web pages from one server to another?
And yet every single time so far I have run into problems, because the
original web design made a series of assumptions that are alien to my
way of thinking, and so a simple move of 10 static pages ends up
costing me 6 hours of my time. Amazing.
Posted by lawrence on July 31, 2004, 9:13 am
Please log in for more thread options
> > Under the domain publicpen.com I've several dozen sites in
> > subdiretories, such as www.publicpen.com/honenbeger. I've no trouble
> > with any of these sites. But under one, which I put in yesterday,
> > www.publicpen.com/staengl, when I point my browser there, the browser,
> > instead of showing me the index.htm pages like it should, it instead
> > tries to download it as an object. Why?
>
> Because http://www.publicpen.com/staengl/ is sent with
>
> Content-Type: application/x-php
>
> and most browsers don't know what to do with that, and most browsers are
> configured to ask the user to save unknown file types.
It looks to me as if this file is already being sent as text/html. Why
does the browser think it is PHP?
Below is the entire text of the file "index.htm".
<html>
<head>
<title>Staengl Engineering: Energy Efficient Design</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
<!-- Fireworks MX Dreamweaver MX target. Created Tue Feb 17 00:36:21
GMT-0500 (Eastern Standard Time) 2004-->
<script language="JavaScript">
<!--
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a[i];}}
}
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++)
x=d.forms[i][n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers[i].document);
if(!x && d.getElementById) x=d.getElementById(n); return x;
}
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array;
for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc)
x.oSrc=x.src; x.src=a[i+2];}
}
I wrote:
>> Because http://www.publicpen.com/staengl/ is sent with
>>
>> Content-Type: application/x-php
>>
>> and most browsers don't know what to do with that, and most browsers are
>> configured to ask the user to save unknown file types.
> This is the content type header in the file:
>
> <meta http-equiv="Content-Type" content="text/html;
> charset=iso-8859-1">
The META http-equiv markup is irrelevant. What matters is the actual HTTP
header sent by the server: