Support » Fixing WordPress » wordpress category urls problem

  • Hi there,
    There is a problem with viewing wordpress categories(not tested for other post types)
    look at this example;
    we have a category with news slug;
    we can view this category with link :
    site.com/category/news
    now, the problem is here
    this category can be viewed by these links too :
    site.com/category/somecustomstringhere/news/
    site.com/news/
    site.com/somecustomstringhere/news/
    Is this a problem with wordpress urls and permalinks?
    it would be show 404 error on each link except first link above.
    is there any idea on this problem?
    tnx.

Viewing 2 replies - 1 through 2 (of 2 total)
  • Hey. WordPress, where it can, “auto-corrects” URLs when no matching URL for the site can be found. This provides some SEO benefits and can be helpful in some cases e.g. when the last bit of a link is cut off in an email, where a user misspells something or can’t remember the complete URL etc.

    You can find some more information about this feature here: http://core.trac.wordpress.org/browser/tags/3.5.1/wp-includes/canonical.php#L13

    Redirects incoming links to the proper URL based on the site url.

    Search engines consider http://www.somedomain.com and somedomain.com to be two different URLs when they both go to the same location. This SEO enhancement prevents penalty for duplicate content by redirecting all incoming links to one or the other.

    Prevents redirection for feeds, trackbacks, searches, comment popup, and admin URLs. Does not redirect on non-pretty-permalink-supporting IIS 7, page/post previews, WP admin, Trackbacks, robots.txt, searches, or on POST requests.

    Will also attempt to find the correct link when a user enters a URL that does not exist based on exact WordPress query. Will instead try to parse the URL or query in an attempt to figure the correct page to go to.

    I’d recommend keeping this feature in place, however there is a way of disabling it through functions.php – let me know if you’d like information on how to do so.

    Thread Starter th90

    (@th90)

    Hi Siobhan,
    Thanks for your help.
    if this feature is good, i will not disable it as you say.
    but there is a problem ,
    this link:
    site.com/category/somecustomstringhere/news/
    loads the content for :
    site.com/category/news/
    but the address in url bar does not redirect to the main and real link
    i mean the url still stays on
    site.com/category/somecustomstringhere/news/
    and does not change to
    site.com/category/news/

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘wordpress category urls problem’ is closed to new replies.