[resolved] New page returning 404 (10 posts)

  1. nikc
    Posted 10 years ago #


    I'm having a problem regarding Pages and permalinks. Sound familiar? I tried searching previous topics, and some cases seemed similar but none of the remedies worked.

    Anyway. This is the problem. I have 2 pages, one works, the other one just gives a 404, and it's not from WordPress but from Apache.

    If I change my permalinks to Default, it works. But as I don't want default, but date & name based ones, that fix is not doable.

    To demonstrate, this page works:

    I created that one some time ago. This morning I created this one:
    (as you'll only get a 404 on that one, I also provide you with this link http://blog.nikc.org/?page_id=56)

    I upgraded to the 2.0.1-version in the hope it would fix my problem but it didn't. Any help would be greatly appreciated.

    I am running on a LAMP-platform, with the latest WordPress.

    Many Thanks

  2. Les Bessant
    keeper of the Tiggers
    Posted 10 years ago #

    Is your htaccess writeable by WordPress?

  3. nikc
    Posted 10 years ago #

    Yes, it is writeable by WP, and I have recreated it several times with no avail.

  4. nikc
    Posted 10 years ago #

    Experimented some more, and turns out this link works when you omit the trailing slash.


    I'm baffled. The link to my other page works like a charm, with or without a trailing slash.


    Here's the contents of my .htaccess just in case it could help. I do however suspect the fault is elsewhere.

    # BEGIN WordPress
    ### BEGIN wp-recent-links rules
    RewriteRule ^recent-links/feed?/?$ wp-recent-links-rss2.php [QSA]
    RewriteRule ^recent-links?/?$ wp-recent-links.php [QSA]
    RewriteRule ^recent-links/([0-9]{4})?/?([0-9]{1,2})?/?$ wp-recent-links.php?y=$1&m=$2 [QSA]
    ### END wp-recent-links rules
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

    # END WordPress

    I have tried removing the recent links-part, but it doesn't change anything.

    Many thanks!

  5. moshu
    Posted 10 years ago #

    Just a thought. If you edit the Page slug and remove the word "blog" from it - does it work?

  6. nikc
    Posted 10 years ago #

    That solved it, thanks!

    I tried meddling with the slug myself, but always kept the word 'blog' in it.

  7. WPChina
    Posted 10 years ago #

    hmmm... but why would "blog" make any difference? Is there something I am missing on why this works without "blog"?

  8. mylagoon
    Posted 10 years ago #

    Yes, please indulge us moshu, I would never have thought of that as the solution.

  9. johnnywoz
    Posted 10 years ago #

    I too am having a very simular problems with permalinks. I removed 'blog' from the slug but with no success.

  10. nikc
    Posted 10 years ago #

    It just hit me why this solution (remove blog from the slug) worked for me, but should'nt be considered a fix for this problem.

    I am running my WP installation on a subdomain blog.nikc.org. This is achieved by using mod_rewrite for redirecting the request to the appropriate directory, instead of having a "real" VirtualHost.

    This directory contains the word blog, and matching is performed against it (in the $REQUEST_URI) to avoid a never ending redirection loop.

    Because I am matching blog/ (with the slash) is probably why the page worked without the trailing slash. Why it didn't work, was because the url (about-this-blog/) which ended in blog/ didn't match the RewriteCond, and thus never reached WP.

Topic Closed

This topic has been closed to new replies.

About this Topic