Parent .htaccess file affecting sub domains

A customer’s main domain has this in the .htaccess file and everything works fine:

AddType application/x-httpd-php .htm .xml .rss

But it ruins one of their iWeb websites that is located in an add-on domain. The navigational links of this affected site completely go away. But if I remove the line from the parent domain account, the links work fine. Then I tried adding this into the .htaccess file for the sub site:

AddType application/x-httpd-php .htm

I saved changes, cleared the cache and reloaded the page. Still the navigational links in the iWeb site are missing. Does anyone have any ideas on what I should try next?

Thanks!

The following thread may help you.

Apache looks for .htaccess files up the folder tree from the current one, back. If it finds one, rules it finds do apply.

It sounds like that is whats happening, I’m assuming your main site is in a folder like public_html and then the extra domain is public_html/domain2 - so anything set in public_html applies to all sub domains too.

Is there any way to over-ride this?

Have you tried AddType text/html .htm in the .htaccess in the subdirectory? That should tell Apache to serve .htm files as plain old html.

Tim,

Actually, it’s the other way around. Apache looks at the .htaccess files in order from the DocumentRoot through the path to the requested directory. That way, a DocumentRoot .htaccess directive ALWAYS takes precedence as it’s parsed first.

Regards,

DK