If a server doesn’t have a .htaccess file, can adding a blank one cause problems

.htaccessweb-hosting

The company I work for uses a number of hosting areas on different servers for different parts of our process. To begin with, we build things on our local machines and test them in localhost. Then, we push to a "QA" server where the site can be viewed; finally, we push the latest version to a "production" server.

I'm using a .htc behavior file (CSS3 PIE) to get IE to comply with CSS3 properties. I'm seeing that work locally, but I don't think I saw it working on QA once it had been pushed. I've seen things like this happen when a hosting solution doesn't pull .htc files up correctly. The solution I usually use is to include a .htacces file with: AddType text/x-component .htc. While this usually works, the QA server doesn't have a .htaccess file, and my superiors are concerned that adding one could cause unforeseen problems.

You can see what I'm trying to do here

Can adding a blank .htaccess file to hosting that doesn't have one cause problems? If not, will adding AddType text/x-component .htc cause any problems?

Best Answer

Having an empty .htaccess shouldn't have any negative consequences (except some minor performance impact), .htaccess files are pretty standard, and if they are empty, they just don't change anything. I don't see what problems the AddType statement could introduce, but you should just test that, which leads me to the following question:

What reason do your organization have to run an QA server if they are afraid to test things on that server?

Anyway, it's entirely possible your server is configured with AllowOverride None in the site configuration which would mean that the .htaccess file would just be ignored. Also, it's of course possible to add the AddType statement either to the global or the vhost configuration section of the server.

Related Topic