are these weird redirects explainable? (8 posts)

  1. dominoeffect
    Posted 6 years ago #

    It's not a problem as such, just something weird that's bothered me for a while.

    When I type in a non-existent page like mydomain.com/podcast or mydomain.com/art, it automatically redirects to an existing post with the same keyword first in its title, like mydomain.com/2009/01/podcast-interview-jan or mydomain.com/2008/06/art-t-shirt-designs/

    Is this exclusive to my website, or can anyone explain why it might be happening?

    It's annoying to be honest. If someone types an incorrect address they should get a 404 page, not this.

    Anyone had the same problem, or know what I'm talking about?


  2. mrmist
    Forum Janitor
    Posted 6 years ago #

    Hmm. Yeah. That doesn't seem right at all. I'll see if there's a bug for it and raise one if not.

    Edit - raised here.

  3. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    I think this might be a browser issue. At least in IE7 is auto-complete is turned on it will have the same results.

  4. mrmist
    Forum Janitor
    Posted 6 years ago #

    I don't think so. I mean auto-complete I could see changing the word tom into tomato (for example). It shouldn't change




    as that's a step too far.

  5. kmessinger
    Volunteer Moderator
    Posted 6 years ago #

    Right, not auto-complete.

    Mine works pretty much like yours but if I type a "p" or "pa" or "par"
    or "part" it takes me to the same post but if I type in "partt" I get a 404. I think that is how I would expect it to work.

  6. dominoeffect
    Posted 6 years ago #

    Thanks all for the input, and mrmist for raising the issue to WP.

    Hopefuly will be fixed in 2.8, weird all the same.

  7. Rutja76
    Posted 6 years ago #

    I had the same problem, not fixed in 2.8 either.

    I ended up in disabling the canonical redirects all at once (the bug is in wp-includes/canonical.php). To do that, as suggested here, I created a plugin called disable-canonical-redirects.php which contains the following code:

    Plugin Name: Disable Canonical URL Redirection
    Description: Disables the "Canonical URL Redirect" features of WordPress 2.3 and above.
    Version: 1.0
    Author: Mark Jaquith
    Author URI: http://markjaquith.com/
    remove_filter('template_redirect', 'redirect_canonical');

    Upload the file in wp-content/plugins and activate it from the Manage Plugins page as usual. No problem of weird redirects anymore :=)

  8. Rutja76
    Posted 6 years ago #

    Just an an addition, maybe useful for understanding the bug: not only it was guessing, say

    example.com/c --> example.com/contact

    but it was also able to rip off added the tail of the URL (which was my main problem), like redirecting

    example.com/contact/lang/fi --> example.com/contact

    that is denying the localisation I had in my web page.

Topic Closed

This topic has been closed to new replies.

About this Topic