2

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?

2 Answers 2

2

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.

3
  • Thanks for your answer! As for why they're afraid of that, it's internal politics. The QA server is viewed by product advocates, and (I believe) also used for some demos. Problems on QA reflect badly on our department, and my bosses don't like that. The person in charge of risk management for the product likes to avoid doing things where the potential negative impact of the change is considerably worse than the likely positive impact, and that includes things that affect the perceptions of people internally who would misinterpret what they were seeing. Feb 17, 2012 at 0:01
  • 2
    @CodeJunkie, convince your bosses that QA!=demo site, because somehow it seems like someone has let them think that your QA should be treated like production. Maybe you can get them to either give you more hardware so they can setup a demo site. It is completely silly to not have equipment that mimics production that you can actually test things on, that may potentially break.
    – Zoredache
    Feb 17, 2012 at 0:39
  • @Zoredache I'm tempted to make a very snarky/rude comment about what the company I work for does when people suggest that things should be done the right way, but this is the internet and I like having a job. Oddly, everyone I talk to at this company seems to agree that things aren't done the right way, and yet it just keeps happening. Either way, I'll mention it to them and see what comes of it. Feb 17, 2012 at 16:49
0

Adding an .htaccess file in the path will cause the information to be read each time a referenced file in the directory and under where it is accessed. So it would add at least one extra file open/close/read and a little bit of processing for each web page accessed by the user.

So if it empty, I would NOT recommend doing this.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .