I only have a basic understanding of .htaccess files. What are some tasks that can be accomplished using them? What are good resources that would aid in learning how to use them on a more advanced level? What are downsides/risks/etc to using them? What are benefits to using them?
closed as not a real question by John Conde♦ Mar 12 '11 at 1:31
It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. If this question can be reworded to fit the rules in the help center, please edit the question.
.htaccess (hypertext access) files are essentially a per-directory Apache configuration file. Whatever configuration options you put in that file will apply only to the contents of that directory including its sub-directories.
What you can do with htaccess files depends on how your specific Apache install is configured. Generally, you can use set, for instance PHP runtime flags, as well as control viewing permissions, password protection, directory indexes, and rewriting urls.
Apache's online documentation has a great tutorial to .htaccess files.
The risk of using an .htaccess file is misconfiguration. If you cause a syntax error in an .htaccess file, Apache will throw HTTP 500 errors to the client making your directory and everything under it impossible to access via web. There is no official .htaccess syntax validator that I'm aware of but you can try this one.
There are tons of great benefits to using .htaccess files. Because they are called on every request they apply to (which could turn into a performance issue for some), configuration takes place immediately and you don't have to reload or restart Apache. They are ideal for, and often used on, shared web-hosting because you won't have access to Apache's main configuration file(s).