Out of the box, the Apache Web server that comes with OS X does not take any notice of .htaccess files (used to set passwords, rewrite URLs, point to custom error pages, etc).
The first step to getting .htaccess working is to edit your httpd.conf file. Open the Terminal, go to the Apache config directory and open httpd.conf. You will need to supply your admin password:
cd /etc/httpd/
sudo pico httpd.conf
Use ctrl-w to find �Override�. You need the second instance of the term so search twice. You should see:
# This controls which options the .htaccess files in directories can
# override. Can also be “All”, or any combination of “Options”, “FileInfo”,
# “AuthConfig”, and “Limit”
#
AllowOverride None
Change the setting to AllowOverride All then exit and save. Each site has a conf file that would need changing too. Back in the terminal, move into the sites directory and get a file listing:
You should see a .conf file for each site on the system. As before, open the conf file for your username and change AllowOverride All:
Options Indexes MultiViews
AllowOverride All
Order allow,deny
Allow from all