Problem with .htaccess and shtml/htm files


#1

Over a year ago, I moved a website from another host to DreamHost. The site uses includes. All files are .htm files, so I setup a .htaccess file with the following content in order to get the includes to work, since the files were not saved as .shtml:

AddHandler server-parsed .htm

The owner is finally ready to move forward with the project again, so I uploaded the files that were working on my DreamHost server to his DreamHost server and all I get is a blank page.

What am I missing?

Thanks!


#2

Try using this in the .htaccess file. Failing that you will have to do some editing. :slight_smile:

[code]AddType text/htm .shtml .htm
addhandler server-parsed .shtml .htm
AddOutputFilter INCLUDES .shtml .htm

[/code]


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK! :@

Act on my advice at your own risk!


#3

Thank you Norm. :slight_smile:

That does make the site work in IE, but now in Firefox it’s creating a download prompt.

I feel like I’m almost there. Any other suggestions…anyone? :slight_smile:


#4

Could be a content disposition thing.
Try without the last line, the includes stuff.

Try flushing your Firefox cache as well.


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK! :@

Act on my advice at your own risk!


#5

Hah - can’t win for losing. Firefox is still the same. IE now gives me the prompt.

I have also been clearing my cache for both browsers as I make changes to the file.

Other suggestions?

Thanks! :slight_smile:


#6

I encountered the similar problem before. Firefox cached htaccess redirect rule and kept forward me to another site. It did not help by clearing Firefox cache.

However, it was back to normal the next day. I did nothing after clearing Firefox cache. Do you want to try your luck (restart your pc or wait for tmr)?

$50 off and 3 free domains with code: [color=#CC0000]DH3[/color] Sign Up NOW or More Codes Here


#7

So it is back to the three line .htaccess file.

Are you able to post a link to a page that causes problems. PM the link if you wish so I can see if I get the same result.

Are you using frames (iframes) and the correct frames DTD header?


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK! :@

Act on my advice at your own risk!


#8

Thank you patricktan. I actually had to reboot my system last night and had not checked the site until this morning, but it is the same.


#9

Norm -
Yes. I’m back to the three line file, but I’m still getting the download prompt in IE, even after clearing my cache and a reboot for good measure.

Here is a link to one of the problem pages:

http://www.vznvirtualboutique.com/shop.htm

But now just going to the main URL will do it too.

There are no iframes in this site and I do have the correct headers, as follow:

I believe I remember validating the site previously, but it’s been quite a while since it was initially created.

Thanks!


#10

that content-type is wrong — it should be text/html instead of text/htm

track7 - my dream-hosted site


#11

Add to those three .htacces lines :-

Options Indexes FollowSymLinks Includes
Add this in for good measure:-

AddHandler server-parsed .html
That makes five lines. You can combine the AddHandler lines when it is working.

Eventually you can probably replace all the entries in your .htaccess file with:-

AddType text/html .html AddHandler server-parsed .html AddHandler server-parsed .htm Which should cause either html or htm files to be SSI parsed. I think.


Norm

Opinions are my own views, not DreamHosts’.
I am NOT a DreamHost employee OK! :@

Act on my advice at your own risk!