Forum Moderators: phranque

Message Too Old, No Replies

Why only old version of htaccess code works on html file with SSI

Latest htaccess codes fail to parse html file with SSI, but old code works.

         

JRMaine

7:27 pm on Aug 1, 2005 (gmt 0)

10+ Year Member



Does anyone know what these results telling us about my host's server? It is "supposed" to be Apache 1.3.33 on Linux, but the only htaccess version that works uses code that leads me to believe it may be a much older version of Apache.

I added the following .htaccess file in order to run SSI in an html file. This did not work for the html files (shtml files worked both before and after adding this htaccess file):

AddType text/html .shtml .html .htm
AddHandler server-parsed .shtml .html .htm
Options Indexes FollowSymLinks Includes

When I change the htaccess file to this, everything seems to working fine:

AddType text/x-server-parsed-html .shtm .shtml .htm .html
Options Indexes FollowSymLinks Includes

Any help or ideas are appreciated. The host can or will not explain.

jdMorgan

1:09 am on Aug 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



JRMaine,

Welcome to WebmasterWorld!

It looks to me like the server's AllowOverride [httpd.apache.org] setting just has FileInfo turned off.

Jim

JRMaine

10:16 am on Aug 2, 2005 (gmt 0)

10+ Year Member



Jim,

Thanks for the tip.

Are you saying that Filetype is turned off so the AddType is being ignored? If so, how does it work with the text/x-server-parsed-html version?

I considered that there may be an Options limitation because the host has indicated that Options can not be overridden, but I know from tests that at least the Indexes option can be overridden. However, the XBitHack Option can not be used.

Also, ErrorDocument (under Fileinfo) should be active. But I haven't specifically tested that other than by using the host's control panel to add the settings.

Thanks,
John

jdMorgan

2:17 pm on Aug 2, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, you're right. That's a logical contradiction concerning FileInfo.

You can find out what version of Apache is running on that server by using the Server Headers Checker [webmasterworld.com]. Maybe that info will be useful.

Jim

JRMaine

3:03 pm on Aug 2, 2005 (gmt 0)

10+ Year Member



Jim:

Yes I checked the headers already. Pretty generic - only says "Apache" see below:

HTTP/1.1 200 OK
Date: Tue, 02 Aug 2005 14:50:19 GMT
Server: Apache

Which I find disturbing and a possible clue that they now run an older version. I am not familiar enough with the Apache version history to know when the "x-server-parsed-html" was replaced. The host made major changes last winter (upsetting many many webmasters due to crashes), and before that returned a different system in the headers:

Using Netcraft:

This Year: Linux/Apache
Last Year: Solaris/Apache 1.3.29

Anyone have any other ideas?

As you can imagine, several of us are in the process of moving sites away from this host (who had been excellent until their problems last winter - no doubt related to corporate mergers).

[edited by: jdMorgan at 3:13 am (utc) on Aug. 3, 2005]
[edit reason] Removed specifics per TOS. [/edit]