Announcement

Collapse
No announcement yet.

301 Redirect Old "Breadcrumb" URL's

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    301 Redirect Old "Breadcrumb" URL's

    I have a client who's URL's on his old site for cat pages were like so...
    http://www.domain.com/category_code/product_code.html

    I'm trying to find a way to replicate those in the new URI system so I can 301-redirect them to the new version of the URL which would be like so....
    http://www.domain.com/product_name.html

    I know I used to do this via .htaccess, but can't figure out how to set up that global redirect within the realm of the new URI system.

    I know this is wrong, as it doesn't work, but I figured it's probably something similar to this.....

    RewriteCond %{REQUEST_URI} ^/(.*)/(.*)
    RewriteRule ^(.*)$ http://dev.thesafetyequipmentstore.com/%2 [R=301,L]

    Any advice would be awesome.
    Ted Hust
    AarcMediaGroup.com

    Celebrating 13 Years of Outstanding Service & Support
    Miva Merchant Design

    #2
    You would import those breadcrumb url formats into the URI Management system as 301 redirects. We have developed a number of tools/reports internally to help speed up the process as you can end up with a lot of variations depending on how many categories the products were assigned to and we have come across some insane legacy url structures.

    Comment


      #3
      That was my fear. As you stated, the nightmare got worse when I realized some products literally have 4 or 5 different URL variations due to the stupid breadcrumb URL's. Luckily in this case, they had always been properly declaring a canonical URL for every product that was simplified.

      So I won't even bother with importing and re-directing all of the breadcrumbs. They never appear in google thanks to the canonical tag being properly used all this time.

      I know there is a redirect floating around in this forum or my email somewhere with a stupid easy way to simply "ditch" that /category_code/ part of the URL via .htaccess that worked flawlessly for me on prior projects, but it was so damn long ago I sadly don't even have those file folders anymore. I'm bad at backing things up from 5+ years ago apparently.

      If I dig it out I'll share it here for anyone else that wants an easier time when their scenario is similar. Otherwise, we're just going to let those URL's die.
      Ted Hust
      AarcMediaGroup.com

      Celebrating 13 Years of Outstanding Service & Support
      Miva Merchant Design

      Comment


        #4
        So I won't even bother with importing and re-directing all of the breadcrumbs. They never appear in google thanks to the canonical tag being properly used all this time.
        It's important to remember that it's not all about Google and what they have in their index, there could still be important external links from other sources using these url formats. Chances are someone posting a product link from this store to a relevant forum won't take the time to dig out the proper canonical before doing so, they will use whatever is in the url bar of their browser. No matter which method used, it's a good idea to properly redirect those breadcrumb urls to prevent killing any possible external link benefits and/or relevant traffic sources. We tend to keep things within URI Management these days for easy client management and performance, but it can definitely still be done other ways.

        Comment


          #5
          There isn't really an htaccess rewrite solution to this problem if you're going from product code-based url to product name-based url because the rewrite rules would have no way to know what the name is that matches the code. You can easily redirect old format code url to traditional long-format merchant url, but that doesn't really solve the problem of getting rid of all the undesirable url usage. You could probably do a product export, grab out the codes and names, then mess with it in Excel to get back to a format suitable for importing as uri management data.
          David Hubbard
          CIO
          Miva
          [email protected]
          http://www.miva.com

          Comment


            #6
            You could probably do a product export, grab out the codes and names, then mess with it in Excel to get back to a format suitable for importing as uri management data.
            Template based report that rolls through the initial product, then the category assignments is an efficient tool for this.

            Comment

            Working...
            X