Forums

404 errors after trying to set up "pretty" permalinks (6 posts)

  1. jozaksut
    Member
    Posted 9 months ago #

    Hi,

    Pardon my frustrations. I'm a novice to WordPress and working with new servers altogether, and I've run into an issue that seems to be pretty common. However, I've tried doing what WordPress suggests and I'm still running into problems.

    Basically, our company is starting a blog on the WordPress platform, and for SEO purposes we'd love to have "pretty" permalinks. However, whenever I try changing our permalink structure to something including post titles, every category and post permalink I click brings me to a 404 error. We've running the newest version of WordPress, and the .htaccess file has everything it should in there. We're running an apache server (though this is just what I know from dev), and we're still running into this problem. The only complicating factor I can think of offhand is that the server isn't live yet - it's only accessible within our office. Can anybody help?

  2. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    Check that mod_rewrite is running on your server.

  3. jozaksut
    Member
    Posted 9 months ago #

    I just checked with our IT and mod_rewrite is up and running.

  4. esmi
    Theme Diva & Forum Moderator
    Posted 9 months ago #

    Then pretty permalinks will work. Have you tried using one of the preset permalink structures? Is your .htaccess file being updated?

  5. jozaksut
    Member
    Posted 9 months ago #

    I've been using the preset structures.

    Our IT took another look at this, and there was an issue with the .htaccess being updated. It's not happening now, though. Thanks so much for your help!

  6. wickyd
    Member
    Posted 9 months ago #

    Even though you have found your solution, I offer this in the hope that it will help others:

    1. Install a WAMP stack. Currently, I use UniServer.
    2. Install WordPress.
    3. Create some content.
    4. Look for .htaccess inside the /www/ folder. It does not exist.
    5. Switch on permalinks and you will see that .htaccess has been written with the following:

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

    6. Do not touch that code. WordPress will stop working. It's OK, just carry on.
    7. Open UniServer\usr\local\apache2\conf\httpd.conf and search for /www" The lines you are looking for are:

    # This should be changed to whatever you set DocumentRoot to.
    
    <Directory "C:/Your-path-here/UniServer/www/">

    8. Change the line:

    Options Indexes Includes

    to:

    Options Indexes Includes FollowSymLinks MultiViews

    9. Save httpd.conf.
    10. Stop UniServer.
    11. Start UniServer and you are done.

    That is it :)

Reply

You must log in to post.

About this Topic