• Resolved sonofadoc

    (@sonofadoc)


    When I change the Permalink Settings from the default value to “Day and name” on my local server installation of WP it breaks the links. For instance: After making the change from the default and go to the home page and select the link under “Recent Posts” I get “Not Found The requested URL /wp_sandbox/wp1/2014/04/26/hello-world/ was not found on this server.” It’s the same for the rest of the links except for those with absolute URL’s.

    Now on my host provider server I don’t have this problem. It’s set up with exactly the same file structure. https://www.example.com(or root-public_html)/folder_name/folder_name. Of course on my local server it’s localhost(or root)/folder_name/folder_name. I also have some WP web properties structured localhost(or root)/folder. In other words set one level up, that give me the same problem.

    I have two local servers now on my machine because I wanted to see if maybe my custom installation of Apache was faulty somehow so I turned it off and installed wamp with exactly the same results. Everything else seems to work fine it’s just the permalink settings that break if I change from the default.

    I’ve been scratching my head over this for some time and I haven’t run across anyone with the same problem yet. Pleeeez! someone help me out with this before I pull all of my hair out.

    Note: All are Apache software/servers. OS: Windows 7

Viewing 3 replies - 1 through 3 (of 3 total)
  • Does your local installation have a .htaccess file in the root folder?

    Thread Starter sonofadoc

    (@sonofadoc)

    For the sake of eliminating possible problems I’ll add this to my post.

    I uncommented: LoadModule rewrite_module modules/mod_rewrite.so in the http.conf folder

    The .htaccess reads like this in both my local and host servers:

    ‘# BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /wp_sandbox/wordpress/
    RewriteRule ^index\.php$ – [L]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /wp_sandbox/wordpress/index.php [L]
    </IfModule>

    # END WordPress

    Thread Starter sonofadoc

    (@sonofadoc)

    Finally! I found the solution here https://www.webdevdoor.com/php/mod_rewrite-windows-apache-url-rewriting/

    Uncommenting or removing the hash tag on “LoadModule rewrite_module modules/mod_rewrite.so” in the http.config isn’t going far enough.

    The 2.4 version of Apache http.config file looks a little different than the 2.2 version, so you might have to look a little harder for the blocks of code. The steps on the above website (link)are for Apache 2.2 and are easy to follow.

    Here are the blocks of code you need to change in 2.4 which comes in the new version of wamp.

    ‘<Directory “c:/wamp/cgi-bin”>
    AllowOverride None
    Options None
    Require all granted
    </Directory>

    Change it to:

    <Directory “c:/wamp/cgi-bin”>
    AllowOverride All
    Options All
    Require all granted
    </Directory>

    Find this block:

    <Directory />
    AllowOverride none
    Require all granted
    </Directory>

    Change it to:

    <Directory />
    AllowOverride All
    Require all granted
    </Directory>’

    That’s it. All of my permalinks on both local servers began working like they should, With the Pretty Permalinks instead of the default.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Permalinks Break’ is closed to new replies.