WordPress.org

Ready to get started?Download WordPress

Forums

Why do my links do this? (14 posts)

  1. WoodiE
    Member
    Posted 8 years ago #

    I'm currently running the latest stable version of WP and I have my permalink structure as so:

    /%post_id%/%postname%/

    All seems to be working just fine, just so long as you stay on page one, because now when I click on "Next Page" the link is this:

    http://www.mywebsite.com/page/2/

    When it SHOULD be this:

    http://www.mywebsite.com/page2/

    Any idea why this is and how I can fix it?

    -Michael

  2. niziol
    Member
    Posted 8 years ago #

    I think having the page number affixed to the primary URI (ie: http://www.example.com/article/2) is the standard, as the paginated portion is controlled internally from WordPress and simply "kicks-in" after the permalink portion of the URI.

  3. WoodiE
    Member
    Posted 8 years ago #

    So how do I fix this?

    WordPress IS installed in the root dir of my website, everything displays and looks fine up until I try to goto Page 2 and so on.

    If I manually enter http://www.mywebsite.com/page2 then it works just fine, however if I click on the link created by WP then it takes me to http://www.mywebsite.com/page/2 which then generates an error stating the article is not found.

    -Michael

  4. WoodiE
    Member
    Posted 8 years ago #

    Anyone?

    -Michael

  5. niziol
    Member
    Posted 8 years ago #

    I think you'd have to either tinker with some of the WP code or write some code that hooks into the rewrite functions - either of which I'd have no idea how to do. Sorry.

    Good luck,
    Michael.

  6. IIIIIIIV
    Member
    Posted 8 years ago #

    I'm not seeing how this is done. There's nothing in the permalink rewrite rules that'd change page URL's like that. I guess it's done from somewhere else.

  7. moshu
    Member
    Posted 8 years ago #

    When it SHOULD be this:
    http://www.mywebsite.com/page2/

    Who told you it should be like that? Normally WP generates page/2/ when using the Next/Prev links on the index.

  8. WoodiE
    Member
    Posted 8 years ago #

    moshu,

    Ok let me rephrase this as I've said above... http://www.mywebsite.com/page/2 does NOT work - instead WP generates an "article not found error".

    http://www.mywebsite.com/page2 DOES work if manually typed in the URL.

    So if WP IS supposed to work as above, then why isn't?

    -Michael

  9. WoodiE
    Member
    Posted 8 years ago #

    bump.

  10. WoodiE
    Member
    Posted 8 years ago #

    anyone?

  11. Chris_K
    Member
    Posted 8 years ago #

    Have you gone through the troubleshooting section at Using_Permalinks?

  12. WoodiE
    Member
    Posted 8 years ago #

    I have however I now went all the way through my .htaccess file and noticed what the new version of WP was doing. It was adding it's rewrite code to the bottom of the file, leaving the old WP code at the top.

    Once I completely removed all the old WP code and left the new WP2.0 htaccess code it works like a charm now.

    Thanks for all your help guys!

    -Michael

  13. webtodd
    Member
    Posted 8 years ago #

    WoodiE,

    I'm thinking of using the same permalink structure as you... how is that working for you? Have you come across any other problems?

  14. WoodiE
    Member
    Posted 8 years ago #

    webtodd,

    No I haven't had any problems at all - in fact I really like this setup. Once I got rid of my old htaccess info it's been working like a charm.

    I've even seen an improvement in my search results on Google.

    -Michael

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.