• Hello everyone,

    I have just begun to use WP and I am very happy so far. I should probably say up front that I don’t know anything about php and coding and all of that, so please talk as simply as possible ??

    Here’s my problem:

    At the bottom of my page there is a link that says “Previous Entries.” When you click on it, it sends you to a nonexistant URL. My blog is at https://blogs.servatus.com/jocose, but when you click on the “Previous Entries” link, it trys to take you to https://blogs.servatus.com/jocose/blogs/jocose/index.php?paged=2

    Now, I can see what the problem is, but I can’t figure out where to fix the link so it points to the right place. I found in the index.php where it tells the site to have the “Previous Entries” words, but there is no <A HREF> type of tag, and I can’t find anything in the Admin section to change that.

    Can someone please help me understand how to fix this?

    Thanks so much!

    Jo Cose
    [email protected]

Viewing 3 replies - 1 through 3 (of 3 total)
  • I was wondering if you ever figured out the problem?!? I have the same issue and can’t figure out for the life of me how to fix it!

    Thanks~

    In your options, what do you have as the Blog url, and the site url settings?

    -tg

    GOT IT!

    It’s ugly but it works. To get rid of the redundant subdomain, just subtract that part of the $index and $qstr strings that is giving the problems.

    To see what they originally were getting, I ran a trace script on the $_SERVER calls in the get_pagenum_link function:


    <?php
    echo $_SERVER['REQUEST_URI'];
    echo $_SERVER['PHP_SELF'];
    ?>

    This gave the orginating file as well as the subdomain. BINGO! This is consistent, so need to excise it.

    Thus to lines 377 to 398 of template_functions_links.php, I added a substr php command to excise this problematic duplication:


    $qstr = wp_specialchars($_SERVER['REQUEST_URI']);
    $qstr = substr ($qstr, 8);
    ...
    $index = $_SERVER['PHP_SELF'];
    $index = substr ($index, 6);

    The discrepancy in the substr calls are because I am getting %7E in $qstr, two characters more than the regular single ~ in $index. However, check what you exactly get by running the trace.php script

    Thus in general, for $qstr, the number should be the length of subdomain name + 4, and for $index it should be +2.

    This seems to have cleared up other 404 errors originating from the login as well as all instances of previous/next entries misdirection.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Previous Entries Link problems’ is closed to new replies.