sage icon indicating copy to clipboard operation
sage copied to clipboard

Permalinks, .htaccess, and local development…

Open benjibee opened this issue 14 years ago • 1 comments

Yes, I know, this has been covered over and over in many issues on this Git. But, after reading through many a report, and many a blog, I was still stuck without CSS and JS while developing Roots locally without MAMP. I've seen countless discussions about the permissions of the .htaccess file, and people posting, sharing, and editing its contents all to no avail. It's because Apache is ignoring this file for the most part, and that is what needs to be changed.

The solution? Editing your user-specific Apache conf file to allow .htaccess files in the user's Sites folder to override default Apache configurations.

Configuring Roots For Local Development

Edit your user-specific conf file located in /etc/httpd/users/yourusername.conf

Adding FollowSymLinks and changing AllowOverride to All so it should look as below:

<Directory "/Users/yourusername/Sites/">
    Options Indexes MultiViews FollowSymLinks
    AllowOverride All
    Order allow,deny
    Allow from all
</Directory>

benjibee avatar Aug 03 '12 11:08 benjibee

You can cheat and stick the js and css directory in the root of your installation... example: http://localhost/wp3.4.1/ <----- place js/ & css/ folders here.

Regards, Darren

expertpixels avatar Aug 03 '12 21:08 expertpixels