Announcement

Collapse
No announcement yet.

Migrate an Existing Store to Use the New URI Management features

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

    Migrate an Existing Store to Use the New URI Management features

    I recently upgraded my store from Miva v4 to Miva 10. I'm wondering if it is possible to redirect old product page URL's to new product page URL's. In other words, if say there is an old link to a product on Pinterest, can that be redirected to the same product on the new site?

    For example, old URL structure was
    https://www.domain.com/Merchant2/merchant.mv ?page=storecode/PROD/category/productcode

    New URL to this same product currently is https://www.domain.com/productname.html

    Thoughts on how to do this?
    Last edited by laserdisc_king; 08-30-21, 04:28 PM.

    #2
    Normally you could do this type of 301 redirect in the .htaccess file as single global rule. However the problem is going to be that your new links use the product name which is not available in the .htacecss file so there is no way to do a direct mapping this way.


    You could first redirect these pages to a temp url such as /productcode.html. Then you could use miva's URI management tools to import all those links and 301 redirect them to the real URL /product-name.hmtl

    That does require two 301 redirects though which is not ideal

    Another option would be to manually add 301 redirect statements for each old style link to each new URL for your top pages.

    Brennan Heyde
    VP Product
    Miva, Inc.
    [email protected]
    https://www.miva.com

    Comment


      #3
      Thanks for your input, Brennan.

      O.K. Manually adding 301 redirect statements for each old style link to each new URL for top pages is out. All of our products are "top pages", and there are too many (1286).

      Why are two 301 redirects not ideal? What could happen?

      I'm thinking I should make the new links use the product code in place of the product name and then use a 301 redirect in the .htaccess file as single global rule. Could you possibly tell me how to do that? How do I change it to product code in place of the product name? I'm guessing I need a Product URI Template. What exactly should I add to the .htaccess file?

      Michael

      Comment


        #4
        Originally posted by Brennan View Post
        Normally you could do this type of 301 redirect in the .htaccess file as single global rule. However the problem is going to be that your new links use the product name which is not available in the .htacecss file so there is no way to do a direct mapping this way.


        You could first redirect these pages to a temp url such as /productcode.html. Then you could use miva's URI management tools to import all those links and 301 redirect them to the real URL /product-name.hmtl

        That does require two 301 redirects though which is not ideal

        Another option would be to manually add 301 redirect statements for each old style link to each new URL for your top pages.
        I think I understand what you are saying but then again I don’t. Can the URI Manangement be used to generate all these URI’s?
        Leslie Kirk
        Miva Certified Developer
        Miva Merchant Specialist since 1997
        Previously of Webs Your Way
        (aka Leslie Nord leslienord)

        Email me: [email protected]
        www.lesliekirk.com

        Follow me: X | Facebook | Pinterest

        Comment


          #5
          Let me throw this in...

          From Joe Owens, Miva Support Engineer:
          "With this, you should be able to make a somewhat "greedy" htaccess rewrite rule that looks for queries containing something like "page=storecode" then strips everything except the variable past the third / character in the query string, and redirect it do domain.com/remainingVariable

          https://www.domain.com/Merchant2/merchant.mv ?page=storecode/PROD/category/productcode to https://www.domain.com/productcode which URI management should 301 push to canonical at https://www.domain.com/productname.html

          With the "greedy" htaccess rule ignoring the PROD page template and the category in the old URL structure, this should handle both CTGY and PROD pages."

          Comment


            #6
            I'm wondering what other people are doing or have done in this situation. This has got to be a common problem when upgrading from Miva Merchant v4 or 5 to Miva 10. It would be nice if there was an easy way to do this and not loose search engine rankings built up over the years. I think this should be built in to Miva. It should be a lot easier.

            Comment


              #7
              Considering Miva 4 has been End Of Lifed for 10 years and out of date for 16 years, it's certainly not anything we get requests to help with these days. Perhaps one of the old timers will have some thoughts, but this is definitely an edge case at this point.
              Thanks,

              Rick Wilson
              CEO
              Miva, Inc.
              [email protected]
              https://www.miva.com

              Comment


                #8
                I see quite a few sites still using Miva 5, which would be the same scenerio. They will run into the same issue if they upgrade to 10. Miva's URI Management does not support URIs that contain '?'. Miva 4 and 5 URIs contain '?'.

                Comment


                  #9
                  Almost no one uses Miva 5, don't let the url structure where is says mm5 fool you, they aren't correlated. Regardless this is literally the first time I've ever seen this request.
                  Thanks,

                  Rick Wilson
                  CEO
                  Miva, Inc.
                  [email protected]
                  https://www.miva.com

                  Comment


                    #10
                    Question - can this "format" (or any portion of it) of the link be entered into the URI Management as a 301 redirect to the Canonical?

                    ​​​​​​https://www.domain.com/Merchant2/mer...ry/productcode

                    ​​​​​​/Merchant2/merchant.mv?page=storecode/PROD/category/productcode

                    Sure it would all have to be built in a spreadsheet to import - if it works...
                    Leslie Kirk
                    Miva Certified Developer
                    Miva Merchant Specialist since 1997
                    Previously of Webs Your Way
                    (aka Leslie Nord leslienord)

                    Email me: [email protected]
                    www.lesliekirk.com

                    Follow me: X | Facebook | Pinterest

                    Comment


                      #11
                      This issue is specific to sites that had been running what I think was the old eMedia Search Friendly Links module? I can't remember which one did that /page/ctgy/prod style link in the query string but I think it was that one. The manner in which you're using it is actually one that was rarely used, as the primary purpose of that module was to convert from what was then Merchant 4-style "long" url's looking like /merchant.mvc?Screen=PROD&Product_Code=abc to ones that look like static files, i.e. /prod/abc.html and in either of those scenarios, the transition to URI management would be easy.

                      So, this issue will not occur for a version 4 or 5 store using normal links, native short links (in 5), or even the preferred short link format of that module, it's just the very unique query string-based short format which was one of the proprietary options the module would permit. This is simply a bad luck situation, but given that module, its developer, that version of Merchant, etc. all went end of life in the prior decade, there was no development time put into such a rare scenario involving one third party module that was long abandoned.

                      I personally think Brennan's option is the ideal solution, even though it involves two redirects. The reason is because redirect one takes a proprietary piece of the query string out that the third party module would have needed, and sends it to a URL that URI management can handle; one small bit of code that auto handles every request since they all match a simple pattern. That allows the request to be handled by Merchant properly after those URI's have been added to URI Management. Then, redirect two occurs by the store itself to send what is now a product code-based request to your preferred product name-based URI so the end result is the page you wanted the shopper or bot to see.
                      David Hubbard
                      CIO
                      Miva
                      [email protected]
                      http://www.miva.com

                      Comment


                        #12
                        Yes, we were running the Search Friendly Links module from Copernicus Business Systems.

                        What would redirect one look like? I assume it would be placed in the .htaccess file.

                        What would be an example of the URI's that need to be added to URI Management?

                        Comment


                          #13
                          Originally posted by lesliekirk View Post
                          Question - can this "format" (or any portion of it) of the link be entered into the URI Management as a 301 redirect to the Canonical?

                          ​​​​​​https://www.domain.com/Merchant2/mer...ry/productcode

                          ​​​​​​/Merchant2/merchant.mv?page=storecode/PROD/category/productcode

                          Sure it would all have to be built in a spreadsheet to import - if it works...
                          These are two rules I see that would apply:

                          URIs must begin with a forward slash

                          URIs may not contain spaces or any of the following characters: ? #

                          I was able to enter /PROD/category/productcode into URI management. Strange thing occurred when I saved it. It added a forward slash and an M. It looked like this: /M/PROD/category/productcode
                          Last edited by laserdisc_king; 09-02-21, 11:53 AM.

                          Comment


                            #14
                            Originally posted by laserdisc_king View Post

                            These are two rules I see that would apply:

                            URIs must begin with a forward slash

                            URIs may not contain spaces or any of the following characters: ? #

                            I was able to enter /PROD/category/productcode into URI management. Strange thing occurred when I saved it. It added a forward slash and an M. It looked like this: /M/PROD/category/productcode
                            Yeah - I forgot about the character restrictions - well darn, so close but so far away.

                            What does your Product URI Template have in it?
                            Leslie Kirk
                            Miva Certified Developer
                            Miva Merchant Specialist since 1997
                            Previously of Webs Your Way
                            (aka Leslie Nord leslienord)

                            Email me: [email protected]
                            www.lesliekirk.com

                            Follow me: X | Facebook | Pinterest

                            Comment


                              #15
                              Originally posted by lesliekirk View Post

                              Yeah - I forgot about the character restrictions - well darn, so close but so far away.

                              What does your Product URI Template have in it?
                              This is what is I have now for Product URI Template:

                              /<mvt:if expr="NOT ISNULL l.settings:product:slugified_page_title"><mvt:eval expr="tolower( l.settings:product:slugified_page_title )" /><mvt:else><mvt:eval expr="tolower( l.settings:product:slugified_name )" /></mvt:if>.html

                              Comment

                              Working...
                              X