Posts on site homepage not found when permalinks turned on (6 posts)

  1. therealmorris
    Posted 6 years ago #

    I have a wordpress blog set up in a /blog/ folder. I set up the index.php of my site to show posts (like the normal wordpress index) by copying "the loop" from the index of the default theme.

    This has worked really well, but recently I tried to change permalinks from default so that I could have nicely formatted links and easily link to "/blog/category/events/" However, when I do so (with a custom structure of "/%year%/%monthnum%/%day%/%category%/%postname%/") my site index.php shows: "Sorry, no posts matched your criteria." I cannot understand it!

    Any help is very much appreciated!

  2. s_ha_dum
    Posted 6 years ago #

    When you edited your permalinks did you notice a message about needing to update your .htaccess file or web.config file?

  3. therealmorris
    Posted 6 years ago #

    No, never saw any message like that. When it is to the custom structure as I want it, the .htaccess in /blog looks like this:

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

    I tried putting the same .htaccess in my site root as well but that didn't seem to help.

  4. s_ha_dum
    Posted 6 years ago #

    That looks right. Maybe an URL would help.

  5. vanduzled
    Posted 6 years ago #

    what server are you on? linux or windows? i bet windows since windows hosting can't allow mod rewrite. you can try the 404 custom page for this so that every time you go to your home and it can not find it, it will redirect it to the right links here is the link

    this doesn't made my problem solved entirely though and still needs some fixing and further knowledge.

  6. therealmorris
    Posted 6 years ago #

    As far as I know it is Linux hosting, and I think mod_rewrite works as when I set the custom structure permalinks in that format work fine, it's just the homepage that doesn't work.

    This is the site home page with "the loop" on. At the moment WordPress is set to default permalinks, shall I turn it to my custom structure?

Topic Closed

This topic has been closed to new replies.

About this Topic