WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Permalink 404 Localhost on Mac OS X (2 posts)

  1. flashdveloper
    Member
    Posted 1 year ago #

    I have followed several documents and other helpful tips on here and no luck getting my Permalinks to work locally! I need to get it working in order to access the /shop/ link that uses WooCommerce and do some debugging, modifications. Without access, I can't get to the files and work on them locally. I've set my httpd.conf file and myname.conf file to AllowOverride All, added the below info to .htaccess (which I believe is writable). Only default settings for links work.

    httpd.conf settings:

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

    myname.conf:

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

    .htacces file:

    # BEGIN WordPress
    
    <IfModule mod_rewrite.so>
    ErrorDocument 404 /hotronix/index.php?error=404
    RewriteEngine On
    RewriteBase /hotronix/
    RewriteRule ^index\.php$ - [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /hotronix/index.php [L]
    </IfModule>
    
    # END WordPress
    
    Options +FollowSymlinks
    
    # RewriteEngine on
    # rewritecond %{http_host} ^localhost [nc]
    # rewriterule ^(.*)$ http://localhost/$1 [r=301,nc]
    
    # protect wpconfig.php
    <files wp-config.php>
    order allow,deny
    deny from all
    </files>
    
    Options +ExecCGI
    
    <IfModule mod_security.so>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </IfModule>

    I am working in a Mac OS 10.8.3 environment.

  2. flashdveloper
    Member
    Posted 1 year ago #

    Found my answer! After some testing by adding a redirect URL to my .htaccess file, I found it was readable, but NOT writeable. I changed the permissions of the .htaccess file using sudo chown:

    -rwxrwxrwx 1 _www staff 503 Apr 29 13:21 .htaccess

    After I completed that step, I went back into the Dashboard, set my Permalinks to default, saved, and then set it back to the Post Name setting, saved, and went back to the site. Voila! It all worked!

    What a pain! Took me 5 hours to figure this all out! BUT, I learned a ton about .htaccess, the code that you CAN do with it and the power it has. Pretty awesome stuff!

Topic Closed

This topic has been closed to new replies.

About this Topic