Forum Moderators: phranque

Message Too Old, No Replies

index page downloading rather than displaying

         

nacho_man

2:16 am on Nov 1, 2005 (gmt 0)

10+ Year Member



This has got to be something simple but I can't find what is wrong.

Have a domain on the server where the index page doesn't display unless specifically called. so www.somedomain.co.uk/index.html will work but not www.somedomain.co.uk/

Now I did edit the httpd.conf directoryindex entry to add index.htm to the list of allowable index pages. But removing the entry or leaving it in makes no difference and the other 15 sites on the server aren’t suffering from the same problem.

Anyone have an idea where I'm going wrong here.. or do you need more info.

Kind Regards

Tony Hyams

Anyango

8:51 am on Nov 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Is There any .htaccess file present in root folder of that domain, overriding something? that possibly could have to do something with it.

Kami

jdMorgan

3:42 pm on Nov 1, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The cause of the 'download' behaviour is likely to be an incorrect MIME-type setting on the file. So, the challenge is to find out why the MIME-type for "/" is incorrect. It should be text/html.

The first step would be to verify this hypothesis with a server headers checker [webmasterworld.com] -- look at a URL that loads and renders normally, and then the one that 'downloads', comparing the MIME-type headers.

The directive to assign MIME-types is "AddType", e.g.


AddType text/html .htm

You could compare your config for the servers that work to the one that doesn't, looking for differences. Also, as Anyango says, look for any .htaccess files containing AddType directives or mod_rewrite RewriteRule [T=] flags that might override the proper MIME-type setting.

Jim

nacho_man

4:49 pm on Nov 1, 2005 (gmt 0)

10+ Year Member



Thanks guys,

There was a .htaccess file in the root for the domain that had an incorrect AddType directive. Removing this solved the problem

Thanks a lot .. you guys saved me some real teeth grinding. I have added this to my ever growing list of stupid things I have done that I shouldn't do again :)