Announcement

Collapse
No announcement yet.

Discontinued products-alternative to 301 redirect

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

    Discontinued products-alternative to 301 redirect

    When we discontinue a product, if possible, we replace that product code with another similar product. We hate to simply delete that product because there might be inbound links to it all over the web. In some cases, we would like to point it to a different, existing product and I know that involves a 301 redirect to that existing product. Before we go that route, is there another solution within Miva Merchant that might be better than cluttering up our htaccess file with 301 redirects over the years to come?


    I've noticed an Alternate Display Page field at the product level in Miva Admin and have read a doc with an example use but am not sure if it could play a part in accomplishing the above or not. It seems more for getting a page into the cat tree.

    Mike

    #2
    Re: Discontinued products-alternative to 301 redirect

    We have talked internally about adding a 301 redirect manager to the core software exactly for situations like this. It would allow you to redirect a discontinued product to a new product using a 301 redirect that Miva creates. It has the same SEO impact as a 301 redirect from the htaccess file without having to manage a large htaccess file.

    While this built in functionality may be a little ways out, it can be done now with some template code.

    On your PROD page above your html_profile tag you can add code like this:

    Code:
    
    <mvt:if expr="g.Product_Code EQ 'test123'">
    	<mvt:assign name="l.header" value="miva_output_header( 'Status', '301 Moved Permanently' )" />
    	<mvt:assign name="l.header" value="miva_output_header( 'Location', 'http://www.domain.com/product/new_test123.html' )" />
    </mvt:if>
    To avoid a bunch of if/else statements, you could tie this into a custom product field. You would create a custom product field for redirect product code. Then if it was populated, you could modify the code above to redirect to that product, outputting the 301 redirect.
    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Re: Discontinued products-alternative to 301 redirect

      I have a module that can do 301 redirects for obsolete products or categories. It's in use at several stores now. Drop me a line if you'd like a copy.
      Kent Multer
      Magic Metal Productions
      http://TheMagicM.com
      * Web developer/designer
      * E-commerce and Miva
      * Author, The Official Miva Web Scripting Book -- available on-line:
      http://www.amazon.com/exec/obidos/IS...icmetalproducA

      Comment


        #4
        Re: Discontinued products-alternative to 301 redirect

        You're hired! lol Brennan, much appreciated and very helpful.

        I'll put in my vote for a built in 301 redirect manager in a future update. While it may not seem like a big deal to add a couple of products to an htaccess file here and there, when I think about what that file might look like in 5 years, I cringe. Your reply will be very useful right now and I think we'll go straight to your suggestion on using a custom product field right out of the gate.

        Thank again.

        Originally posted by Brennan View Post
        We have talked internally about adding a 301 redirect manager to the core software exactly for situations like this. It would allow you to redirect a discontinued product to a new product using a 301 redirect that Miva creates. It has the same SEO impact as a 301 redirect from the htaccess file without having to manage a large htaccess file.

        While this built in functionality may be a little ways out, it can be done now with some template code.

        On your PROD page above your html_profile tag you can add code like this:

        Code:
        
        <mvt:if expr="g.Product_Code EQ 'test123'">
            <mvt:assign name="l.header" value="miva_output_header( 'Status', '301 Moved Permanently' )" />
            <mvt:assign name="l.header" value="miva_output_header( 'Location', 'http://www.domain.com/product/new_test123.html' )" />
        </mvt:if>
        To avoid a bunch of if/else statements, you could tie this into a custom product field. You would create a custom product field for redirect product code. Then if it was populated, you could modify the code above to redirect to that product, outputting the 301 redirect.

        Comment


          #5
          Re: Discontinued products-alternative to 301 redirect

          This is part of toolkit using the TKSL and Archive pages. Once set up you have a page in the admin that you can add either products or categories and redirect them.
          format looks like this

          *L108H^PROD^l108^#
          *9Zbrand^CTGY^shop-by-brand^#

          http://www.emporiumplus.com/v5/tksl.txt
          Last edited by Mark Hood; 08-14-14, 09:33 AM.
          Mark Hood
          Vermont Gear

          Comment


            #6
            Re: Discontinued products-alternative to 301 redirect

            We've been using the Toolkit solution, too. Works great. Let's you go back and correct a redirect if/when you do get "replacement" product with low pain factor.

            Comment


              #7
              Re: Discontinued products-alternative to 301 redirect

              Here's another vote here for ToolKit's Archive Manager function. Couldn't live without it.

              It only does a search when a "not found" page is requested (as opposed to a .htaccess solution that would need to be checked with each page load).

              On the other hand...

              In some cases, we would like to point it [the deleted product url] to a different, existing product and I know that involves a 301 redirect to that existing product.
              Please be careful doing this.

              Make sure that the product is EXTREMELY similar to the original product, and watch your metrics.

              If the products are so different that people are following a link and getting redirected to a page that DOESN'T meet their expectations, then this could end up hurting your authority in the eyes of google.
              Mark Romero
              ~~~~~~~~

              Comment


                #8
                Re: Discontinued products-alternative to 301 redirect

                Can someone help me with the modifications my original .htaccess file below, I have the TKSL and ARCHIVE pages created but when I try to modify the .htaccess file to use the TKSL I have something wrong.

                DirectoryIndex /mm5/merchant.mvc?Screen=SFNT

                RewriteEngine On

                RewriteRule ^mm5/admin.mvc? - [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^([^/]+)/product/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=PROD&Product_cod e=$2 [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^([^/]+)/category/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=CTGY&Category_co de=$2

                [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^([^/]+)/product/([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=PROD&Category_co de=

                $2&Product_code=$3 [QSA,L]

                RewriteCond %{REQUEST_FILENAME} !-s
                RewriteRule ^([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=$2 [QSA,L]


                Thanks

                Mark

                Comment


                  #9
                  Re: Discontinued products-alternative to 301 redirect

                  Take a look here:

                  http://www.emporiumplus.com/v5/tksl.txt

                  Shows what needs to be added for TKSL to work via .htaccess

                  Comment


                    #10
                    Re: Discontinued products-alternative to 301 redirect

                    Thanks. Still missing something. The Product and Category pages come up blank with the following:

                    DirectoryIndex /mm5/merchant.mvc?Screen=SFNT

                    RewriteEngine On

                    RewriteRule ^mm5/admin.mvc? - [QSA,L]

                    RewriteCond %{REQUEST_FILENAME} !-s
                    RewriteRule ^([^/]+)/product/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=TKSL&Product_cod e=$2&%{QUERY_STRING} [L]

                    RewriteCond %{REQUEST_FILENAME} !-s
                    RewriteRule ^([^/]+)/category/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=TKSL&Category_co de=$2&%{QUERY_STRING} [L]

                    RewriteCond %{REQUEST_FILENAME} !-s
                    RewriteRule ^([^/]+)/product/([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=TKSL&Category_co de=$2&Product_code=$3&%{QUERY_STRING} [L]

                    RewriteCond %{REQUEST_FILENAME} !-s
                    RewriteRule ^([^/]+)/([^/.]+).html$ /mm5/merchant.mvc?Store_code=$1&Screen=$2 [QSA,L]

                    Comment

                    Working...
                    X