The default configuration of Apache on Mac OS X disables the use of per-directory configuration files (.htaccess). Enabling this feature requires a small number of changes in the the Apache configuration.

sudo pico /etc/apache2/httpd.conf

under the section:

<Directory "/Library/WebServer/Documents">

change AllowOverride None to

AllowOverride All

If you are using the Sites folder in your home directory, you should also change the AllowOverride in the configuration files for each user: /etc/apache2/users/*.conf