Forum Moderators: phranque
If I had my druthers, I would most certainly rather keep it all in the .htaccess files because I know how to do that, it's easy and most importantly, I have no clue how to edit httpd.conf... I am not a good server admin.
However, all I am reading is that .htaccess is highly intensive on the server as it is per-directory and needs to be called (processed) with every request. I generally have 7-10 rewriterules within my .htaccess files in various sections of my website, and my website receives on average about 5,000 unique visitors per day. I do have a dedicated server with 2GB RAM.
If I went ahead and implemented mod_rewrite using .htaccess files, would I be making a big mistake if website performance is important to me? Or am I falling victim to "premature optimization"? I can understand a Fortune 500 company not wanting to use .htaccess files, but for my server, will there be any noticeable decrease in server speed?
If someone installs a blog like WordPress, or a content management system like Drupal, Joomla, etc. that has built-in or pluginable rewritten URL's... is that always done by .htaccess modifications? I'm guessing it doesn't have anything to do with httpd.conf. Correct?
Thanks for any guidance or help you can provide. Take care.
So there is a huge performance advantage to putting code into httpd.conf on very-busy sites.
There is also a disadvantage: As implied above, in order to update your "code" in httpd.conf, you must restart your server, so that your changed code will be re-compiled so that those changes will go into effect.
Your "sixth sense" about all this seems well-centered and reasonable: At 5000 uniques per day, and with so few rules, there's nothing to worry about as long as your code is tight and well-written.
Jim