Viewing 12 replies - 1 through 12 (of 12 total)
  • Thread Starter byorgey

    (@byorgey)

    After much struggling I was able to get it fixed; everything seems to be working well now but I’m not sure if I fixed it in the “right” way! =)

    It turns out there were two problems. First, the server was reporting the REQUEST_URI strangely. I’ve had this problem before, and fixed it, but for some reason something changed slightly so I had to re-fix it. Essentially I had to edit wp-settings.php so that it deleted /~byorgey/wordpress/ from the REQUEST_URI. Once I fixed that, it got stuck in an infinite redirect… https://www.mathlesstraveled.com redirected to https://www.mathlesstraveled.com, which redirected to… and so on. I finally was able to fix this by commenting out the line

    do_action(‘template_redirect’);

    in wp-includes/template_loader.php. I have no idea what this line is supposed to do, so I don’t know if commenting it out is a good idea (I found it by grepping the entire source tree for ‘redirect’), but it seemed to fix things, so…

    Moderator Samuel Wood (Otto)

    (@otto42)

    www.ads-software.com Admin

    Instead of doing that, try adding this to your theme’s functions.php:
    remove_action('template_redirect', 'redirect_canonical');

    That new code causes a redirect to what WordPress thinks should be the “correct” url for any given page on the site. This line will disable it.

    Problem with redirect_canonical is that it absolutely relies on $_SERVER[‘REQUEST_URI’] being correct, so if you’re doing something weird to it, then it may not end up right.

    What is your code to correct the /~byorgey/wordpress/ problem? That may be slightly off which is triggering the problem.

    I have a similar problem and I tried to find an answer with no success; the next/previous links introduce a duplicated domain in the link. It seems that byorgey got to the core of the problem. I tried to follow his/her suggestion but with no success – I do not know what to edit in wp-settings file.
    I’d appreciate any help. I can post/send the content of my wp-settings file if needed. Thanks
    [email protected]

    PS my blog is at https://oregonstate.edu/~dogaruc/tapirul

    Why not just follow Otto’s instructions? Instead of messing around with the core files (which means headache at every upgrade!) – just make a simple text file and put in it what Otto posted:
    <?php remove_action('template_redirect', 'redirect_canonical'); ?>
    then save the file as functions.php into the theme folder.
    Note, if you have a functions.php in your theme(s), just add the line above to it.

    that would have been my next question ??
    I do have functions.php files in my theme folder, I was going to ask where should I add the line, at the beginning, at the end, etc.

    PS Any hint on the other problem, in the admin panel (comments section) clicking on “next comments” send me back to the admin panel?

    Anywhere. To the end. Just make sure you will NOT have an empty line or space after the last closing ?> – it would throw in a lot of errors.

    One step at a time… you already hijacked this “solved” topic, so let’s not go into other issues in it.

    doesn’t do the trick…

    Hmmm… I am sure the issue is that tilde [~] in your URL and the new way how WP 2.3 treats the permalinks.

    Unfortunately, I am not a coder as Otto is, so I don’t have any suggestions.
    Let’s hope he will come around.

    I cannot change the tilde unfortunately, this is how I access my space on the university’s server. Looks like byorgey fixed it the hard way, though, and he has a tilde as well
    I tried changing permalinks back and forth, too.

    si ma intrebai ce am…
    I’ve switched to b2evolution, they have a converter, better customer support and better features.

    hey tapirul, i’ve been having the same problem on the same server (oregonstate). did you ever figure out how to resolve it?

    yes i did
    I moved to https://www.bluehost.com ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘URL problem after upgrade on virtual host’ is closed to new replies.