Forum Moderators: phranque

Message Too Old, No Replies

htaccess prevents viewing by I.E.

My one Win98 computer can't view a site.

         

HeyJim

2:37 pm on Feb 20, 2004 (gmt 0)

10+ Year Member



In order to run php on .htm(l) pages I created an htaccess file with the following line in it:
"AddType application/x-httpd-php3 .html .htm"
There's only that one line and no quotes.

Everything seems to be working fine except on my one Win98 computer which now suddenly can't view anything on the website. Viewing the website from my XP computer works fine.

The Win98 computer tries to save everything on the site as a file instead of just viewing the page.
Any clue what the problem might be? It seems to me that I encountered a similar problem years ago but even that had nothing to do with htaccess. I had not even heard of htaccess at that point.

[edited by: HeyJim at 3:00 pm (utc) on Feb. 20, 2004]

HeyJim

2:47 pm on Feb 20, 2004 (gmt 0)

10+ Year Member



To further explain, I had this identical problem last week but the computer in question always does strange things anyway so I didn't think too much about it. I just removed the htaccess file and figured I'd deal with the problem later.

Yesterday I loaded the htaccess file again and tried to view the site from the Win98 computer and did so without any problem. Refreshed and reloaded several times without any problem so I went ahead and set up my htm page with the php in it and proceeded with my little project.

This morning my partner (using the Win98 machine) was going along fine and then suddenly she couldn't view anything on the website in question. I wound up rebooting her computer but still can't view anything on the website. It just treats the htm pages as a file that must be saved or opened from where it is. However, other websites can be viewed perfectly so I can only conclude that the problem has something to do with the .htaccess file that's now present.

At this point I have no way of even telling if it is just a problem with this one computer or if all visitors with Win98 are encountering the same thing. The site displays fine on my XP computer.
Really puzzling.

jdMorgan

3:29 pm on Feb 20, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



HeyJim,

I'm out of my league here (I don't do php - yet), but it seems to me that what is wanted here is AddHandler and not AddType. It seems to me that there is no reason to instruct Apache to tell the browser that the page content is of MIME-type "php3". Rather, you just want to make sure that the server parses the page for php code before serving it as a completed MIME-type text/html document.

If you tell the client browser that the page is of type application/x-httpd-php3, then Windows will look for a program on the PC to run it. Failing that, it will offer to download it (save it to disk).

I could be totally and completely wreong about this, but I hope someone with an investment in the problem will investigate and post their findings.

These directives are described in the Apache mod_mime [httpd.apache.org] documentation.

Jim

HeyJim

3:38 pm on Feb 20, 2004 (gmt 0)

10+ Year Member



BINGO! THANK YOU, thank you, thank you.