• Resolved nikc

    (@nikc)


    Hi,

    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:
    https://blog.nikc.org/books-read-while-in-thailand/

    I created that one some time ago. This morning I created this one:
    https://blog.nikc.org/about-this-blog/
    (as you’ll only get a 404 on that one, I also provide you with this link https://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

Viewing 9 replies - 1 through 9 (of 9 total)
  • Is your htaccess writeable by WordPress?

    Thread Starter nikc

    (@nikc)

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

    Thread Starter nikc

    (@nikc)

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

    https://blog.nikc.org/about-this-blog

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

    https://blog.nikc.org/books-read-while-in-thailand/
    https://blog.nikc.org/books-read-while-in-thailand

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

    —————–8<—————–
    # 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]
    </IfModule>

    # END WordPress
    —————–>8—————–

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

    Many thanks!

    Just a thought. If you edit the Page slug and remove the word “blog” from it – does it work?

    Thread Starter nikc

    (@nikc)

    That solved it, thanks!

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

    WPChina

    (@wordpresschina)

    hmmm… but why would “blog” make any difference? Is there something I am missing on why this works without “blog”?

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

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

    Thread Starter nikc

    (@nikc)

    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.

Viewing 9 replies - 1 through 9 (of 9 total)
  • The topic ‘New page returning 404’ is closed to new replies.