• Resolved dbadness

    (@dbadness)


    Hi all,

    I have recently cleanly installed WP 4.1 on Ubuntu 14.04 and I’m having the issue of all page permalinks (except the homepage) routing incorrectly and returning Apache’s 404 error (“The requested URL /about was not found on this server.” for example). In other words, the default permalink config (/?page_id=123) works correctly but any custom permalinks do not.

    I’ve scoured the forums and the internet for solutions and have tried the following to fix it:

    • Switched from default permalinks to postname, date, etc, and back to make sure the htaccess is updated correctly via WP
    • Make sure all slugs are updated and correct
    • Changed permissions on the server to 755 (recursively and verbosely)
    • Manually added what the forums say is the correct htaccess code

    Thank you in advance for your help. Here’s the site for reference. If you need any clarification please ask as I’ve been struggling with this for two weeks now!

Viewing 6 replies - 1 through 6 (of 6 total)
  • Is the Apache rewrite module enabled?

    Thread Starter dbadness

    (@dbadness)

    Hi Mark,

    Yes it is. I just double-checked by running the following command and reloading the page:

    sudo a2enmod rewrite && sudo service apache2 restart

    My htaccess in the home directory (where index.php is) reads as follows:

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

    Thank you.

    Try adding this to the .htaccess

    ErrorDocument 404 /index.php

    Thread Starter dbadness

    (@dbadness)

    Thanks, Rajesh.

    Tried that but it’s still returning the same error.

    Thread Starter dbadness

    (@dbadness)

    Found the fix.

    It was a rewrite error as the following needed to be added to the vhost in Apache:

    <Directory /var/www/home>
    Options Indexes FollowSymLinks MultiViews
    AllowOverride All
    Order allow,deny
    allow from all
    </Directory>

    Hope this helps someone!

    Great!

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘404 errors with non-default permalink settings’ is closed to new replies.