WordPress.org

Support

Support » How-To and Troubleshooting » [Resolved] Perma links leading to 404

[Resolved] Perma links leading to 404

  • I have wordpress installed in my root folder and instead of my links being the default setting I decided to customize the permalink structure to this: /%year%/%monthnum%/%day%/%postname%/

    That’s great but going back to my homepage none of the links work, they all go to 404 pages – check for yourself:

    http://www.newcastle-online.com/

    I’m thinking it has something to do with my general settings which at the moment appear like so:

    WordPress address (URI): http://www.newcastle-online.com/
    Blog address (URI): http://www.newcastle-online.com/

    What am I doing wrong? I don’t want to mess about too much as I’m not too clued up with all this sort of thing and I don’t want to break WordPress or lose data so some pointers would be greatly appreciated, thanks.

    BTW when I change permalinks back to default setting, the links work again.

Viewing 15 replies - 1 through 15 (of 21 total)
  • Some good troubleshooting stuff on the Permalinks page.

    In particular, confirm with your host that mod_rewrite and AllowOverride are both on and enabled.

    My htaccess file reads:

    RewriteEngine On
    RewriteRule x.html y.html

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

    # END WordPress

    Does that mean its enabled and on?

    And if you go to x.html, do you actually get y.html?

    I don’t know what you mean, sorry.

    Your .htaccess has this line:

    RewriteRule x.html y.html

    If you have mod_rewrite working, browsing to http://yourdomain.com/x.html should result in display y.html.

    If you create an x.html and a y.html file and upload them, does it?

    I’ve just created both y and x.html files uploaded them and when I type them into my browser I get those files and not switched around, does that mean I don’t have mod-rewrite enabled on my server?

    Still no nearer to solving this, does anyone have any ideas? We have modrewrite turned on. The thing is, it was working on the old server, only when we moved has it started doing this yet the paths are all correct, everything.

    I went to your x.html. If your mod_rewrite was working, your server should’ve presented me with y.html.

    It didn’t.

    Thus, the other piece I suggested: Check with your host and make sure AllowOverride is enabled for your domain.

    Hi Solo, thanks for your reply. Just fired this thread off to the server guys. My spellchecker, anti-spam comments images and my imagemanager aren’t working either, could this be down to mod_rewrite do you think, too, like with the permalinks?

    It’s conceivable that those are all related.

    If you visit Options -> Permalinks and set ’em to “Default”, do any of the other things start working?

    No they don’t, they don’t work for any comination of permalink set up strangely enough. I’ll get my server team to take a look at the other things or I’ll uninstall them and reinstall them as I’ve read from others who’ve moved servers of having success that way.

    Hmm, my current settings in “Options”, “General” are:

    WordPress address (URI): My full domain name
    Blog address (URI): My full domain name

    Now if I change the Blog address URI to this: http://www.newcastle-online.com/index.php

    And then go to “Permalinks” in “Options” and set it to this: “Date and name based”

    My Permalink structure looks like this: http://www.newcastle-online.com/index.php/2006/10/21/sample-post/

    But when I press Update a blue warning says: You should update your .htaccess now.

    And at the bottom the following is printed out:

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

    What do I do?

    That is the structure I want but without the index.php bit in so it just does this instead: http://www.newcastle-online.com/2006/10/21/sample-post/

    Also, clicking http://www.newcastle-online.com/2006/10/21/sample-post/ takes me to a server generated 404 where as clicking http://www.newcastle-online.com/index.php/2006/10/21/sample-post/ takes me to a WordPress generated 404

    Am I getting close to what is the problem or is this just even more problems?

    Ok, you’re on the right track…

    First off, remove index.php from your Options -> General settings.

    Head back to Options -> Permalinks and set your permalinks as desired. Presumably, you’ll get that warning again. That’s WP telling you that it can’t write to the .htaccess file (or create one).

    So, look in your blog directory for the file (it’s hidden, so if using an FTP client, make sure you tell it to show hidden files). If you don’t find it, create one and upload it with the contents that WP told you to put in there. If there is one there, just add that block of code.

    I did what you said but this time it didn’t say I needed to update htaccess, it says Permalink structure updated.

    But going back to my site the links head to 404s again, not WordPress generated 404s but server ones.

    For example: http://www.newcastle-online.com/2006/10/20/a-message-to-newcastle-fans-from-palermo-fans/

    What does that mean?

Viewing 15 replies - 1 through 15 (of 21 total)
  • The topic ‘[Resolved] Perma links leading to 404’ is closed to new replies.
Skip to toolbar