 |
June 9 '09, 05:59 PM (#1)
|
|
|
New Member!
Join Date: June 2009
Location: Victorville, CA
Posts: 7
|
IE tries opens my html code, instead of the website
My web pages are http://www.shadey4.com/b3lph3g0r and http://www.shadey4.com/alex. The alex page works fine. The b3lph3g0r page works in Firefox and worked earlier today in IE. When you go to that page it tries to open the html file in notepad instead of IE. I thought I might have made a coding mistake so I tried to use the alex page to re-create the b3lph3g0r page, but no luck, still doing the same thing. The page still works in firefox.
I'm sure I'm doing something stupid. I've done web pages on and off for years as a hobby.
Thank you,
Conrad
|
|
June 9 '09, 07:21 PM (#2)
|
|
|
WDF Staff
Join Date: April 2004
Location: Cottage Grove, Minnesota
Posts: 3,401
|
Do you have a directory called: b3lph3g0r ?
|
|
June 9 '09, 09:14 PM (#3)
|
|
|
New Member!
Join Date: June 2009
Location: Victorville, CA
Posts: 7
|
Quote:
|
Originally Posted by mlseim
Do you have a directory called: b3lph3g0r ?
|
I only have one directory. This file is named b3lph3g0r.html. I have many pages with different subjects, should I be using directories?
Thank you,
Conrad
|
|
June 9 '09, 09:18 PM (#4)
|
|
|
New Member!
Join Date: June 2009
Location: Victorville, CA
Posts: 7
|
Quote:
|
Originally Posted by shadey4
I only have one directory. This file is named b3lph3g0r.html. I have many pages with different subjects, should I be using directories?
Thank you,
Conrad
|
I'm sorry I replied hastily. I do not have a directory called b3lph3g0r. I only have my main directory.
|
|
June 9 '09, 09:34 PM (#5)
|
|
|
WDF Alien Overlord
Join Date: April 2003
Posts: 6,421
|
Websites need file extensions on the file itself. I'm guessing firefox is reading the code of the page to see that it's an HTML file, whereas IE is only looking at the file extension.
|
|
June 9 '09, 11:24 PM (#6)
|
|
|
New Member!
Join Date: June 2009
Location: Victorville, CA
Posts: 7
|
Quote:
|
Originally Posted by Wired
Websites need file extensions on the file itself. I'm guessing firefox is reading the code of the page to see that it's an HTML file, whereas IE is only looking at the file extension.
|
You hit the nail right on the head. Too bad for me, now I have to go back and change 40 + pages.
I am on Linux at home where I work on my pages and I didn't test my pages on IE until I went to work. I downloaded ies4, so I can test my pages on older versions of IE.
Thank you for your assistance.
|
|
June 10 '09, 03:46 AM (#7)
|
|
|
WDF Regular
Join Date: June 2009
Location: Goldsboro, North Carolina, USA
Posts: 109
|
The problem you're having is the server is not sending the mime type as HTML instead it is sending it as plain text.
Before any webpage is sent to the web-browser the server sends a packet of information preceeding the page that tells the browser how to handle it.. some instances are TEXT, HTML, IMAGE, and FILE. If for instance your MIME types are hosed up, you could also be actually getting a download prompt in your browser when you try and view an image. You'll just have to search through your hosting provider's settings and make sure those are all set correctly and that the webserver is handling those file-types like it should.
I'm an avid Linux supporter in the server platforms and I'll say that having a linux server with apache cuts out these types of problems nearly 100%. Linux actually reads the file types from the file itself... Windows uses the extension to determine what kind of file it is, what to open it with through the registrey which is proven faster, however it can become very innacurate. Linux actually pre-opens the file first, reads the file headers for the file type and then makes the appropiate determination of what kind of file it is and what it is best opened with. Because the Apache Webserver is designed for Linux/Unix it does the same thing if not installed on Windows or OS2 Warp.
I'm not sure what you're rig looks like on you're web-hosting end but if you could gain access to some kind of control panel and add .html .htm as MIME types "HTML" that should get things fixed for you.
Also if you're trying to run something.php without php being installed it would do the same thing, so it would be up to the person(s) hosting your site to ensure that software is installed.
Last edited by Danny[MLWA]; June 10 '09 at 03:51 AM.
|
|
June 10 '09, 01:17 PM (#8)
|
|
|
New Member!
Join Date: June 2009
Location: Victorville, CA
Posts: 7
|
Quote:
|
Originally Posted by Danny[MLWA]
The problem you're having is the server is not sending the mime type as HTML instead it is sending it as plain text.
Before any webpage is sent to the web-browser the server sends a packet of information preceeding the page that tells the browser how to handle it.. some instances are TEXT, HTML, IMAGE, and FILE. If for instance your MIME types are hosed up, you could also be actually getting a download prompt in your browser when you try and view an image. You'll just have to search through your hosting provider's settings and make sure those are all set correctly and that the webserver is handling those file-types like it should.
|
I am at work and cannot look into it at the moment. I am on GoDaddy hosting and I am pretty sure I have Linux hosting. Tonight or tomorrow I will go onto the Goaddy control panel and look into it. Funny you should mention php, the night before (Monday) I was trying to install Joomla via Virtual Box / Jumpbox, but I did not finish it. When I got to the part to put in the ip address, it timed out. I think I was supposed to install it onto GoDaddy first, which I didn't do. Another one of my To Do's. I don't know if that had any affect on my problem.
Thank you for your assistance.
|
|
June 10 '09, 01:43 PM (#9)
|
|
|
WDF Regular
Join Date: June 2009
Location: Goldsboro, North Carolina, USA
Posts: 109
|
You are sure that php is installed and working for your account on Godaddy?
Try uploading a php file with this in it:
Code:
<?php phpinfo(); // I think that is it... ?>
If that displays a lot of config values, php is working fine, if not... thats a new ball-game.
|
|
June 10 '09, 01:54 PM (#10)
|
|
|
WDF Member
Join Date: February 2009
Posts: 36
|
I always do a web layout and then upload the first page before I continue to work on the rest of the layout. That normally saves a lot of time, especially if their are errors and the rest of the website has the same layout.
|
|
June 10 '09, 04:16 PM (#11)
|
|
|
New Member!
Join Date: June 2009
Location: Victorville, CA
Posts: 7
|
I put the code in and it gave me this huge list of settings. Excuse my ignorance, but I don't want to post the information for everyone to see. Do you want me to send it to you in an email?
Thanks again,
|
|
June 10 '09, 08:45 PM (#12)
|
|
|
<div id="learn"></div>
Join Date: February 2008
Location: Port Huron, Michigan
Posts: 986
|
If it displayed a bunch of info, then it's fine. The only thing with godaddy is I believe they are still running php4, which may present some problems with the newer scripts that are designed.
Adding a file extension to 40 pages ain't that bad!
|
|
June 10 '09, 09:13 PM (#13)
|
|
|
WDF Alien Overlord
Join Date: April 2003
Posts: 6,421
|
Ultimately you need file extensions on your files. It's very easy to do, and will solve a lot of issues.
|
|
June 10 '09, 09:51 PM (#14)
|
|
|
WDF Regular
Join Date: June 2009
Location: Goldsboro, North Carolina, USA
Posts: 109
|
Yeah just to be safe, rename your files to something.php, if you want the .php to be hidden you can use mod_rewrite to do that for you assuming Godaddy has mod_rewrite enabled for Apache... I don't see why they wouldn't.
|
|
June 11 '09, 12:05 AM (#15)
|
|
|
New Member!
Join Date: June 2009
Location: Victorville, CA
Posts: 7
|
I will go back and rename all of my files. Thanks to all of you.
|
|
June 11 '09, 08:14 PM (#16)
|
|
|
$man->withAMission()? //true
Join Date: December 2003
Location: Pennsylvania/Arizona
Posts: 602
|
Apparently this issue is resolved, but if anyone has a similar case, IE displaying code or something other than a rendered web page while other browsers do just fine can be a case of sending the "true" XHTML MIME type instead of the HTML MIME type. Application/XML+XHTML breaks IE (at least some versions).
Also: If you want to retain the file-extensionless look of your website's pages, you can do this with a Mod_Rewrite rule.
Last edited by Wired; June 12 '09 at 04:17 AM.
Reason: merged posts
|
|
|
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
|
|
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
|
| Advertisement |
|
|
|