I’ve recently been trying to apply the use of .htaccess files to some test sites running on my localhost web server (Mac). After wondering why I couldn’t get things to work and subsequently spending several hours tinkering with the content of my .htaccess and httpd.conf files, I discovered this fantastic .htaccess tutorial, that not only improved my understanding of .htaccess, but highlighted the fact that my local server wasn’t even reading the .htaccess files to begin with! It seems quite stupid in retrospect but hopefully this will help someone else suffering the same problem!

I’d been checking and re-checking the configuration settings in the httpd.conf file, completely unaware that each user profile on the Mac has it’s own httpd.conf file! So within the main directory is a folder named “Users” containing the config file for each user profile, and the settings within these override the settings in the main config file.

Example of the config files in the directory structure

Example of the config files in the directory structure

Altering the settings within the specified user config file fixed the issues I was having.

If you’re having Apache issues, you may find the following link useful – outlining the default file locations for each version of Apache.

Leave a Reply