Web Design Forums

Welcome! Please register or log in: Forgot your password? Why register?
You are here: Web Design Forums » Web Design Help » HTML and CSS Help » IE tries opens my html code, instead of the website RSS

IE tries opens my html code, instead of the website

This thread was started by shadey4 and has been viewed 678 times, and contains 15 replies, with the last reply made by straight_up.
Post Reply
1
1 points at 100%
Posted June 9 '09 at 06:59 PM
      Posts: 7
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

Advertisement Register for free to hide these ads and participate in discussions!

2
1,251 points at 99% Moderator Repute
mlseim, WDF Moderator Private message  
Posted June 9 '09 at 08:21 PM
      Posts: 3,100
Do you have a directory called: b3lph3g0r ?
If it's zero degrees outside today, and it's supposed to be twice as cold tomorrow, how cold is it going to be?

3
1 points at 100%
Posted June 9 '09 at 10:14 PM
      Posts: 7
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

4
1 points at 100%
Posted June 9 '09 at 10:18 PM
      Posts: 7
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.

5
345 points at 100% Donor Moderator Repute WDFplus Member
Wired, Admin and WDF Alien Overlord Home page   Private message  
Posted June 9 '09 at 10:34 PM
      Posts: 6,275
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.
Admin at houseofhelp.com
WDF Resources: The Rules
Founder/Creator/Admin of ZE SECRET PROJECT!

Was another WDF member's post helpful? Click the positive rating button () above the post.
Wired is online now! Reply

6
1 points at 100%
Posted June 10 '09 at 12:24 AM
      Posts: 7
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.

7
32 points at 100%
Posted June 10 '09 at 04:46 AM
      Posts: 76
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 June 10 '09 at 04:51 AM by Danny[MLWA]. Reply

8
1 points at 100%
Posted June 10 '09 at 02:17 PM
      Posts: 7
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.

9
32 points at 100%
Posted June 10 '09 at 02:43 PM
      Posts: 76
You are sure that php is installed and working for your account on Godaddy?

Try uploading a php file with this in it:
<?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.

10
2 points at 100%
Posted June 10 '09 at 02:54 PM
      Posts: 30
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.

11
1 points at 100%
Posted June 10 '09 at 05:16 PM
      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,

12
328 points at 98% Repute
Posted June 10 '09 at 09:45 PM
      Posts: 721
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!
Steve,
Man I hate being dumb!
Aero Web Design

13
345 points at 100% Donor Moderator Repute WDFplus Member
Wired, Admin and WDF Alien Overlord Home page   Private message  
Posted June 10 '09 at 10:13 PM
      Posts: 6,275
Ultimately you need file extensions on your files. It's very easy to do, and will solve a lot of issues.
Admin at houseofhelp.com
WDF Resources: The Rules
Founder/Creator/Admin of ZE SECRET PROJECT!

Was another WDF member's post helpful? Click the positive rating button () above the post.
Wired is online now! Reply

14
32 points at 100%
Posted June 10 '09 at 10:51 PM
      Posts: 76
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.

15
1 points at 100%
Posted June 11 '09 at 01:05 AM
      Posts: 7
I will go back and rename all of my files. Thanks to all of you.

16
326 points at 100% Moderator Repute
straight_up, $man->withAMission()? //true Home page   Private message   E-mail
Posted June 11 '09 at 09:14 PM
      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.
I am Alan Hogan (@alanhogan on Twitter). I like PHP, UI/UX design, and OS X.
Last edited June 12 '09 at 05:17 AM by Wired ("merged posts"). Reply

Post Reply

Similar Threads
Thread Thread Starter Forum Replies Last Post
Top 21 PHP Programming mistakes thexchord PHP 18 March 10 '10 09:52 AM
Co-founder for website needed (website coding skills required) pro.gui Job Postings 3 July 30 '07 07:28 AM
Code tags reminder filburt1 Announcements 4 November 3 '05 06:29 PM
website code cleanup. rneedham Request a Service 0 June 13 '05 05:34 PM
JavaScript Dropdown Menu Tutorial [Li] Brad Coding Articles & Tutorials 12 August 17 '04 04:16 PM