Forums

404-error on permalinks (23 posts)

  1. joelsandberg
    Member
    Posted 3 months ago #

    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!

  2. Gangleri
    Member
    Posted 3 months ago #

    http://codex.wordpress.org/Using_Permalinks

    Do you have all requirements?

  3. joelsandberg
    Member
    Posted 3 months ago #

    Yes I have, and I´ve been through all those guides a hundred times! None of it helps..

  4. ZGani
    Member
    Posted 3 months ago #

    Are you on a Windows server by any chance?

  5. joelsandberg
    Member
    Posted 3 months ago #

    the server is running on Ubuntu

  6. jwargo
    Member
    Posted 3 months ago #

    I'm having the exact same problem. I upgraded to WordPress 2.8.4 just a couple of days ago and while my posts can be viewed on the home page, you cannot open any of them unless you have Permalinks set to default or numeric. I did some testing on it last night and confirmed it's repeatable. When you change Permalinks to anything but default or numeric it happens - when you switch it back, works like a champ.

    This is a WordPress blog that has been working fine for months. It's running on ubuntu and is hosted by fatcow.com.

    Methinks we have a bug?

  7. ns_rajan
    Member
    Posted 3 months ago #

    404 - Not found, Sorry, but you are looking for something that isn't here.

    I have the same problem on my WP install since last week. It was running ok for last 1 year with permalink /yyyy/mm/dd/postname format without a hitch. Last week I tried to meddle with three things - kses.php, rewrite.php, and .htaccess. I have tried to reset all the changes, have changed all the file permissions, ownerships of those files.

    It does this:
    Pages are working ok, posts are showing up in homepage (if it shows latest posts), category pages are showing latest posts. It gives the 404 error in date-wise pages and single post pages. It works if reset to default permalink structure. It was working for about a year now, and there are other WP installations on the same apache which has permalinks working.

    Any help would be appreciated.

    Thanks.

  8. ZGani
    Member
    Posted 3 months ago #

    The .htaccess could be the problem.

    What code do you have in there?

  9. joelsandberg
    Member
    Posted 3 months ago #

    The .htaccess could be the problem.

    What code do you have in there?

    Well that´s one problem I found.. Wordpress is supposed to create that file automatically right?
    Well it doesn´t, but it still tells me that the permalinkstucture were updated successfully.
    Why is this?

  10. ZGani
    Member
    Posted 3 months ago #

    No, if wordpress does not have the right permissions then it wont set up an htaccess for you - but yest it should prompt you to create one and give you the bellow code to input. If it didn't prompt then there's something a miss.

    Creat an .htaccess file and add

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

    # END WordPress

    upload to your server and hopefully that should get the permalinks going. You may need to reset your permalinks first.

  11. jwargo
    Member
    Posted 3 months ago #

    I'll check on this, but it doesn't explain why it was working and all of a sudden stopped (unless my ISP changed the .htaccess file.

  12. jwargo
    Member
    Posted 3 months ago #

    My WordPress folder has that code in the root's .htaccess file. Still not working.

  13. joelsandberg
    Member
    Posted 3 months ago #

    I created the .htaccess file and all, now it gives me a 500 internal server error. I think this have something to do with the mod_rewrite function, am I wrong?

  14. ns_rajan
    Member
    Posted 3 months ago #

    joelsandberg.. you need to activate mod_rewrite in httpd.conf...

    regarding my problem - i did changes to kses.php, rewrite.php and then .htaccess.. I have reset all of them, but still same problem. Pages work, category page shows the post, home page shows the posts, but single post in atahualpa won't show. I tried the classic theme, deactivate all the plugins, won't work. If I put default option for permalinks /?p=123, it works. Pretty permalinks wont work at all. Funny thing is it works for pages all the time. I have multiple WP in one machine, where ever I tried to make those changes last week, they are all broke, it was working for the past 1 year. Any help would be appreciated.

    Thanks

  15. jwargo
    Member
    Posted 3 months ago #

    I checked with my ISP and mod_rewrite is enabled by default.

  16. jwargo
    Member
    Posted 3 months ago #

    Anything? Help? So there's two of us here who have had this working for months and all of a sudden (for me I think it was a WordPress update) it isn't working anymore. Does anyone else have any suggestions? Please?

  17. diyiinbi
    Member
    Posted 3 months ago #

    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 (http://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?

  18. diyiinbi
    Member
    Posted 3 months ago #

    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 (http://codex.wordpress.org/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 (http://codex.wordpress.org/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}

  19. ns_rajan
    Member
    Posted 3 months ago #

    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

  20. makuchaku
    Member
    Posted 2 months ago #

    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
    http://makuchaku.in

  21. iranzov
    Member
    Posted 1 month ago #

    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.

  22. RatwareUK
    Member
    Posted 1 month ago #

    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

  23. elucia1
    Member
    Posted 1 month ago #

    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 (http://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: http://wordpress.org/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.

Reply

You must log in to post.

About this Topic

Tags