The Ultimate Guide to .htaccess Files
Apache's .htaccess configuration files have baffled countless developers. This tutorial aims to break through this confusion by focusing on examples and thorough descriptions. Among the benefits of learning .htaccess configuration is automatic gzipping of your content, providing friendlier URLs, preventing hotlinking, improving caching, and more. First, the basics. Introduction: I’ve read a number of .htaccess articles online. “Give a man a fish and he will eat for a day. In this article I’m going to try to not just show you examples of useful .htaccess directives, but explain exactly what is going on. My focus will be on Apache 2, however much of this will apply to Apache 1.3 and I'll try to point out any differences that I know of. Finally, this tutorial will make the most sense if you read it in order. What is .htaccess? To quote Apache: .htaccess files (or “distributed configuration files”) provide a way to make configuration changes on a per-directory basis. Directives Comments Headers
Related: Semantic Web
• web dev.