Forums

automatically redirect tag links to duplicate / similar category links (1 post)

  1. drkknght
    Member
    Posted 5 months ago #

    i have a lot of categories on my site, with more added regularly.

    i have a lot (more) tags on my site, with (even) more added regularly.

    sometimes the two overlap. for example, one day, i might decide to make my "sonic" tag into a category. however, i might also have links to the "sonic" tag somewhere on my site. or, i might accidentally continue using "sonic" as a tag. the result is a bunch of conflicting pages at best, "notfound" errors at worst.

    obviously, the best answer is "don't be so dumb" but that's not always possible :)

    so, i was wondering if there was some bit of dynamic code i could throw in my functions file (or something) that would essentially say "if there is a tag that has the same name as a category, 301 redirect all /tag/ links to the respective category, ignoring the actual tag page"

Reply

You must log in to post.

About this Topic