Files
kennethreitz.org/data/essays/2010-01-basic_authentication_protected_files_htpasswd.md
T
2025-08-27 08:08:17 -04:00

684 B


January 2010

title: "Basic Authentication Protected Files (htpasswd)" date: "2010-01-01" category: "Web Development"

Basic Authentication Protected Files (htpasswd)

Here's a snippet for password protecting a directory served by Apache

To set this up, just add .htaccess and .htpasswd to the desired directory being served by Apache.

Make sure to generate your own .htpasswd file.

http://gist.github.com/347430.js

For more htaccess snippets, checkout PerishablePress' Stupid .htaccess Tricks.