• Hi. I′m having a major problem. The pretty permalinks doesn′t work. The only structure that works is the default, which sucks…
    When I change the structure it says that everything is okay and that the structure was changed and whatever, but when I try to visit the links, it just gives me a 404error, the page cannot be found.
    Please help me on this one!

Viewing 7 replies - 16 through 22 (of 22 total)
  • I just inherited a blog from my brother. Yesterday, I upgraded it from 2.7.1 to 2.8.4. When I tried to change the permalinks from /?p=123 to /%category%/%postname%/, it didn’t work. (404 error.) (I had to manually update .htaccess due to write permissions on this particular host.)(Linux, Apache.)

    That is, it didn’t work until I went in and edited each individual post…about a 4 hour job, thankfully there were only 46 posts when I took over admin duties. I also added tags while I was at it. (My brother had used no tags at all!) Articles can be found using tags links from the tag cloud with either type of permalink enabled.

    Now, I can switch back-and-forth between default and custom permalinks and the links to the articles work fine. But when using custom permalinks, the category links are broken! WP can find no articles in any category until I switch back to the default “ugly” permalink style.

    I tried using the migration feature in the advanced permalinks plugin (https://urbangiraffe.com/plugins/advanced-permalinks/) but to no avail.

    I have tried activating/deactivating all the plugins. All I get when clicking on a category link in the sidebar when anything but the default permalink is being used is “Nothing found for category {whatever-category-i-clicked-on} in the title bar and a corresponding error message on the page.

    I tried using different themes. The only thing that changed was the error message text on the category page.

    I tried creating a new category and posting to it while permalinks was set to /%category%/%postname%/, and it worked!

    So, I thought, why not just rename each category to something temporary, create a new category with the desired name and slug, then move all posts from the old renamed category to the new one? (Another 3 or 4 hour task probably, but if it works…) Well, moving an existing post to the test category I created did not work. Clicking on the link for the new category brought up only the article originally posted to that category, not any existing posts that were moved.

    Also, if I change the slug for the new test category, it breaks it. Changing the slug back to what was originally used when creating it repairs it. Switching back to default permalinks has no effect except for what is displayed in the title bar. (…/?cat=226 vs. …/category/test.)

    Any ideas?

    Update:

    I think the problem was that the migration feature in the advanced permalinks plugin was causing an endless loop. Somehow, I never tried it with the advanced permalinks migration feature unused (no redirects) while using a custom permalink; whenever I switched to/from default/custom during testing & troubleshooting, I also added/deleted a redirect on the migration page at the same time. I finally tried it with custom permalinks, no redirect in migration, and – voila! – everything works like a charm.

    I was even able to change the custom permalink to add the post number at the end as per instructions in the codex (https://codex.www.ads-software.com/Using_Permalinks#Tips_and_Tricks) and it still works fine. (i. e., a different custom permalink structure than the first one I used. And no 4 hours of editing all of the posts this time!)

    And I was able to change the slug for a category without it breaking anything.

    I also added a line to .htaccess to use …/post/123, also in the codex (https://codex.www.ads-software.com/Using_Permalinks#Long_Permalinks).

    And everything works great!

    Pastor Marv
    -Blog Diyiin Bi {my 1st blog, soon to be moved from b2evolution to WP}
    -John’s Joint {the inherited blog}
    -The Go Light {a spin-off from Blog Diyiin Bi}
    -Christian Internet Resources {another spin-off from Blog Diyiin Bi}

    it WORKS for me now… I had changed rewrite.php and removed ‘category’ from category base. Apparently permalinks didn’t like this. Once I put it in, and used a clean new .htaccess file uploaded via ftp, it works ok now.

    Thanks for all your help

    Hi all,
    I was facing exactly the same problem – switched to fancy URL’s and it started showing up 404 errors for category names.

    Solution
    – Enable mod_rewrite in your apache2 installation
    #a2enmod rewrite; /etc/init.d/apache2 restart
    – Change “AllowOverride None” to “AllowOverride All” in your virtual host config.
    – Create an .htaccess file in your WP’s root dir. I have WP installed in ${document_root}/content and my .htaccess looks like

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

    And voila! It works!

    Thanks all for the discussion which finally helped :))


    Maku
    https://makuchaku.in

    Thank you makuchaku,

    I had “AllowOverride None” so the .htaccess wasn’t read.

    I have changed it and now permalinks works perfect.

    Thank you all.

    Hello to everyone with a Permalinks issue reading this post.

    I thought I’d reply as I went through everything listed in this thread and from other sources yesterday trying to fix the 404 error with the new version of WordPress. I edited .htaccess, enabled mod_rewrite.. etc etc But no joy! In my particular case, it 404’d when viewing a “complex” permalink I’d just posted or when trying to create a new post containing one.

    Eventually, I started looking at my mod_security logs and it would seem that /wp-admin/post.php was being blocked by my own server as it was reading the request as a possible SQL injection.

    I have white listed the /wp-admin/post.php URI from mod_security and bingo, issue resolved.

    Hope this helps.

    Regards,

    Matt Buck
    Principal Engineer
    RatwareUK
    RatwareUK Blog

    Hello!

    I’ve been TRYING to follow the comments above, and believe I may have a similar problem (the Permalink problem?) but not sure.

    Is there someone on this post who would be able to help? Here is my problem:

    After editing an older page in my blog (https://elainelucia.com), suddenly all of my Pages seemed to disappear.

    I receive the following message when I attempt to view any of my Pages:

    “The requested URL /blog/listen/ was not found on this server.
    Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request.”

    I contacted my ISP and re-loaded a ‘snapshot’ of my site (a backup version from earlier in the day) and that did not seem to help.

    When I go into my Dashboard, I can see and open all Pages: they are all there, and the content is in tact.

    QUESTIONS:

    1. How do I know if this is the “worm” problem, as described in this post: https://www.ads-software.com/development/2009/09/keep-wordpress-secure/

    2. I’ve attempted to “re-publish” the Pages; that doesn’t seem to work. It seems I need to “re-link” them? Can someone tell me if this might be the case, and if so, HOW to fix?

    I would say I am not quite a novice at WordPress, but no expert, either. And I am guilty of NOT upgrading, so am aware that I probably caused this problem by my inattention to upgrading. That being said, I desperately need my site to be back and running soon as possible. It’s how I make my living right now!

    Thanks in advance to anyone with the patience and knowledge to help me.

Viewing 7 replies - 16 through 22 (of 22 total)
  • The topic ‘404-error on permalinks’ is closed to new replies.