John Cox

Blogs · @wyome · Now · Shelf

Tagged newonnettuts · everything

Interesting

.htaccess Files for the Rest of Us | Nettuts+

.htaccess files are plain text configuration files used to customize Apache web server behavior at the directory level, and this guide covers their practical applications including URL rewriting and redirects for SEO purposes, custom error pages, password protection, IP blocking, browser rendering control, caching optimization, and content compression. The article explains that .htaccess files are read on every server request so changes take immediate effect without server restart, making them useful when direct access to the main configuration file isn't available, though they do incur a minor performance cost. Each use case is illustrated with code examples showing how to implement common tasks like converting query strings into friendly URLs, serving custom 404 pages, and setting far-future expiration headers to improve site load times.

Permalink