Forum Moderators: phranque

Message Too Old, No Replies

File download prompt instead of website

         

alexey9

7:37 am on Aug 6, 2007 (gmt 0)

10+ Year Member



Hello,

I've just transferred few websites to new server. Now, when I go to [subdomain.example.com,...] I get "text/x-server-parsed-html" file download prompt.

I think there is some problem with Apache config file. Websites use non standard index files (not index.html). Each website has .htaccess in it's folder and .htaccess has these lines:
AddType text/x-server-parsed-html html htm
DirectoryIndex start-page.htm

I wonder how can I fix this bug?

jdMorgan

7:17 pm on Aug 6, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Are you using SSI or PHP on your pages?

Using AddType for this function is incorrect, as is "text/x-server-parsed".

It should be "AddHandler server-parsed" -- but you may not need it at all if you don't use SSI or PHP.

Jim

alexey9

7:56 am on Aug 7, 2007 (gmt 0)

10+ Year Member



Thanks for reply. I've added AddHandler server-parsed .html .htm to .htaccess file. I use SSI on my server. The .htaccess has these lines now:

AddType text/x-server-parsed-html .htm .html
AddHandler server-parsed .html .htm

But I still get file download prompt in Firefox and I see HTML source instead of "normal" webpage in Safari.

By the way, when I comment line:

AddType text/x-server-parsed-html .html

my website works, but SSI doesn't work.

How can I turn on SSI so websites work?

jdMorgan

1:47 pm on Aug 7, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Posted above:

It should be "AddHandler server-parsed"

Don't use "x-server-parsed-html" in either directive.

Jim

alexey9

3:09 pm on Aug 7, 2007 (gmt 0)

10+ Year Member



Thanks, this works. :)