Take the 2-minute tour ×
WordPress Development Stack Exchange is a question and answer site for WordPress developers and administrators. It's 100% free, no registration required.

I'm using Mac OS X's built in Apache + PHP with MySQL. Everything works perfectly, except for my pretty %postname% permalinks — they just won't work. I have obviously enabled mod_rewrite and set the AllowOverride setting to All on my httpd.conf file. In case there's anything I can do (I really don't want to run MAMP), is there any programmatic way to use default permalinks on localhost using the very same template files?

share|improve this question

2 Answers 2

up vote 0 down vote accepted

Your /etc/users/{username}.conf should look like this:

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

You also have to change the name Apache runs under to be able to save the .htaccess rules and use the media uploader etc...

<IfModule !mpm_netware_module>
<IfModule !mpm_winnt_module>

User chris
Group admin #or you can use staff

</IfModule>
</IfModule>

The AllowOverride is listed a couple of times in httpd.conf make sure you changed the right one or both. One is the default setting and the other is for Library/WebServer/Documents which you should change to whatever server document root your using.

Apache has to be restarted for any changes to take affect. sudo apachectl restart

Also see How to Install Apache and PHP on Mac OSX for more details.

share|improve this answer
    
Thanks, Chris! One question, though: where should I add that second <IfModule> code? Right after the first one, inside my .conf user file? –  João Ramos Apr 26 '11 at 21:12
    
It should be already there towards the beginning of the file with the user and group set to _www. It's surrounded by comments that I removed to paste in here. –  Chris_O Apr 26 '11 at 21:25

there are two conf files for the built in apache, one for your username, which may be setting allowoverride to none.

share|improve this answer
    
Thanks, Milo. I just got to /etc/users/[username].conf and set AllowOverride to "All" as well. Let me reboot and see if it works already. –  João Ramos Apr 26 '11 at 16:32
    
Nope, it didn't work. Any more suggestions? –  João Ramos Apr 26 '11 at 17:42
    
do you have an .htaccess file with the proper rewrite rules? –  Milo Apr 26 '11 at 17:49
    
Perfect, that's what was missing. Thanks, Milo! :) –  João Ramos Apr 27 '11 at 11:11

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.