Apache is a very flexible web server implementation. The .htaccess files give the webmasters the ability to override the default server configuration on a per-directory basis, provided that httpd‘s configuration pernits the overrides of the htaccess file. I am aware that there are thousands of cheat sheets (aka ready-made recipes) out there, mostly implementing mod_rewrite conditional redirections, but I decided to bookmark this article because it is very well and carefully written.
[Update]: Also, another resource of htaccess recipes exists here. I didn’t have the time though to go through all of their sections, but all .htacces rule examples seem very organized and well written too.
The .htaccess Cheat Sheet by George Notaras, unless otherwise expressly stated, is licensed under a Creative Commons Attribution-Noncommercial-Share Alike 3.0 Unported License.