WordPress.org

Forums

Post Paged and .htaccess (10 posts)

  1. Anonymous
    Unregistered
    Posted 11 years ago #

    When using Post Paged, the pages will look like http://www.domain.com/index.php?page=1 and so on. Does anyone knows a rewrite entry that will page that nice? Does the code needs to get changed as well?
    Thanks!

  2. Anonymous
    Unregistered
    Posted 11 years ago #

    Anyone?

  3. Anonymous
    Unregistered
    Posted 11 years ago #

    Hmm, Looking at functions.php:
    // Add post paged stuff
    $match .= '([0-9]+)?/?$';
    $query .= '&page=' . preg_index($i, $matches);
    // Add post feed stuff
    $feedregex = '(feed|rdf|rss|rss2|atom)/?$';
    $feedmatch .= $feedregex;
    $feedquery .= '&feed=' . preg_index($i, $matches);
    // Add post trackback stuff
    $trackbackregex = 'trackback/?$';
    $trackbackmatch .= $trackbackregex;
    // Site feed
    $sitefeedmatch = 'feed/?([_0-9a-z-]+)?/?$';
    $sitefeedquery = $site_root . 'wp-feed.php?feed=' . preg_index(1, $matches);
    // Site comment feed
    $sitecommentfeedmatch = 'comments/feed/?([_0-9a-z-]+)?/?$';
    $sitecommentfeedquery = $site_root . 'wp-feed.php?feed=' . preg_index(1, $matches) . '&withcomments=1';

    The Post Paged "stuff" is not coded mod_rewrite friendly. I am not PHP expert (not even a newbie). Anyone can solve this? Tks!

  4. Beel
    Member
    Posted 11 years ago #

    It has been discussed ad infinitum otherwise I would have posted a link, but do a search and you will find some posted rewrite rules and why, for the most part, paged links are not rewritten.

  5. Anonymous
    Unregistered
    Posted 11 years ago #

    You lost me Beel. Care to give me a hand? English is not my mother tongue.

  6. Beel
    Member
    Posted 11 years ago #

    If you do a search on this forum with key words you will get a list of topics relevant to your question like this:
    http://wordpress.org/support/index.php?action=vthread&forum=3&topic=2056&page=0

  7. Anonymous
    Unregistered
    Posted 11 years ago #

    He probably lost you with the "ad infinitum" because it's latin :) It took me a bit after I first saw it to figure out it within context.
    But anyways, Beel is right. There is no point in using mod_rewrite for pages, since the page numbers aren't permanent.

  8. Anonymous
    Unregistered
    Posted 11 years ago #

    Mark, in the case I wasn't looking to have mod_rewrite for permalink purposes, just for consistency. If the whole site of going to be running clean URI's, I would love to see http://www.domain.com/page/1/, for example.

  9. charle97
    Member
    Posted 11 years ago #

    you're going to have to hack the function that controls whatever is outputting the paged uri. i don't know what function you're trying to use, so i can't give you any specifics.
    i use clean uri's for my paged category archives. i had to hack the vBulletin Style Page Navigation hack to get what i want.

  10. Anonymous
    Unregistered
    Posted 11 years ago #

    Can you share that hack, charle97? And the entry on mod_rewrite, of course. I might be able to see what you did and do the same on the other function(s). It would be nice if this would get implemented in WP, so updates would not mess things up...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.