I'd like to start off by saying I am really new to working with apache, so please don't hold it against me.
The HTML5 Boilerplate comes with a .htaccess file, but I'm using django (on webfaction) and so I have a httpd.conf file for apache. Can I put the code that's in the Boilerplates .htaccess file into my httpd.conf? I'm confused at the difference between the two and would appreciate any help / insight you can give?
Most/all of the rules in the boilerplate's .htaccess
can be moved to httpd.conf
, and in fact this will give a small performance boost, because the httpd.conf
file only needs to be loaded once by Apache, whereas it needs to read the .htaccess
on every page load. This of course also means that changes to httpd.conf
will need a daemon restart (sudo apache2ctl -k graceful
or similar.)
In general, you put things that are relatively "static" in httpd.conf
, and things that you might want to edit easily and without restarting the Apache daemon, in .htaccess
. On shared hosts, the customer can typically only use .htaccess
to modify the server behavior, so in that case that's the only choice you have.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With