views:

240

answers:

2

I know this question has been asked many times and I've researched it myself on Google as well but just can't come up with the answer I need.

My hosting company is NOT letting me use the httpd config file, instead it wants me to use .htaccess. I am not a server admin but I have to believe that there is a performance hit for using this file? I have a site with approx 5 million page views a month and it's growing. I do not have a lot of rewrite rules just some optimizations we make to serving pages faster ,mod_deflate, caching, etc.

Assuming there is a performance hit, my question is, how bad will it be on my site? Can .htaccess handle 5 million page views with some rewrite rules? How would I be able to test this if I wanted to?

Thanks.

+2  A: 

Performance hit for reading the file? That's micro-optimization. Favour .htaccess. You don't need special privileges to edit it.

Also on a shared hosting site, everyone shares the httpd.conf settings so, if thats your situation, it's not applicable.

cletus
No, it's a dedicated server and my site is the only one on it. After reading Apache optimization techniques, they all point to using httpd instead of htaccess but don't really provide stats to back it up.
frio80
and who should restart httpd after editing the config file?
innaM
if it's a dedicated server why can't you edit your httpd.conf that would really annoy me. Maybe you could get a import into the httpd.conf.
the_ajp
+1  A: 

Well, to my knowledge, the performance difference is negilible, comparred to the computing time used for whatever's used in the .htaccess. For what's it's worth, I've seen no measurable difference by having a .htaccess file.

mikl
Of couse, you'd have to set AllowOverrid to None to be able to see the difference.
innaM
How big a difference? When does that "difference" start to matter?
frio80
Well, small enough that I haven't been able to measure the difference. That might not fly in a science paper, but I really don't think there's any performance gain here to speak of.
mikl