This tutorial will walk you through how to update your existing URL structure to be controlled by the new URI Management functionality of Miva (released in 9.0004). Detailed technical documentation on the feature can be found here.
Before you start, the first question you need to answer is this: “Do you want to keep your existing URL structure, or change it to something different?”
For the majority of people you are **NOT **going to want to change your existing URL structure. If you start modifying your URL structure and it is not done 100% correctly you can easily wipe out any Search Engine rankings you have built up over the years. Make sure you are working with an experience consultant before you decide to change your URLs.
However, there will be cases where it does make sense to change your URLs to something completely different so we are going to cover both cases and the steps involved in each.
Note: URI Management can only be used in a CSSUI store. You will not be able to migrate to this feature if you are using MMUI.I. Keeping Existing URL structure (recommended)
Modify Templates To Match current URL structure
First, navigate to URI Management from the left menu. On the Settings tab you will see 3 templates. These are the master URI templates that control the URI structure when a new product, category or page is created.
Here are the defaults for each of these. Miva uses the product name (or title if populated) as the URL. Spaces get replaced with dashes and special characters get removed.
Example URI: /basket.html
Example URI: /green-t-shirt.html
Example URI: /cotton-shirts.html
For this example here are what my existing URLs look like:
Basket Page: http://apps.miva.com/BASK.html
Category Page: http://apps.miva.com/category/new-apps.html
Product Page: [http://apps.miva.com/product/MIVA-MMUI-TO-CSSUI.html](http://apps.miva.com/product/MIVA-MMUI-TO-CSSUI.html)
Because I don’t want to change this structure, I need to update my URI templates to reflect the structure I am currently using. Here is what this looks like:
Generate URIs for all pages, products and categories
Now that I have correctly configured my URI master templates I can generate the URIs for all products, categories and pages. Navigate to the URIs tab and click generate.
You will see the following dialog:
I'm going to leave the default settings and click the generate button. This generated 491 unique URIs:
Verify template code is correct
Next we want to verify the template code that is being used on my site which outputs the URLs is not hard coded and uses the correct variables.
This is the correct item tag to This is the correct variable.
The link that is being used for the product is this: &mvte:product:link; This is the correct item tag. If this is correct, most likely all the other template code is also correct but it is worth checking.
Set Your Homepage
The last step before we can make the new URI Management system active on our site is to set which page we want to show up at the root domain. 99% of the time this will be your storefront page. We don’t set this for you automatically because in the case where you have multiple stores you may want a different page to display.
To set this search for the SFNT page and edits its URI:
Change it to:
Additional information on this change can be found here.
Turn On URI Management
We’re now ready to activate URI Management. To do this go to the Settings tab and from the Link Source drop down choose URI Management. The next step is to update the htaccess. For specific directions on how to do this, click here.
Click update to save this setting.
Remove old SEO Settings
Now that the URI Management Is active you want to turn off the legacy SEO settings. Go to the legacy SEO Settings tab and uncheck SEO-Friendly Store Front as well as Enable Short links.
Keep in mind that this modifies your .htaccess file and removes code within the Miva comments. If you added custom .htaccess code within these comments it will get removed as well. If you are unsure, it is worth while to check the .htaccess file before updating these settings.
Verify all links are working correctly
The last thing you’ll want to do is click around your site and verify all links are working correctly. Because we kept the same URL structure nothing should visibly change. All the links should be the same as they were before.II. Changing Existing URL structure (with 301 Redirects)
There are two additional steps to what is outlined above if you are going to change your URL structure.
1. Create import file for old URLs & Import as 301 redirects
If Your URLs are going to change after you generate your URIs (using your new structure) you need to import your Old URLs as 301 redirects to maintain your existing Search Engine Rankings. Depending on your old structure you can create the export in a number of ways:
For this tutorial since I already have my old URLs created in URI Management i’m going to use #4 above. Since I already have my current URIs in the URI Management, I can change the master URI templates to my new URI structure and generate new URIs. There is a setting to automatically take the old URIs and make them 301 redirects.
This will regenerate new URIs for all my products, categories and pages. Now when I go view a product I see two URIs. My new canonical which is the slugified product name and my old URI which is not a 301 redirect to my new URI. This is exactly the functionality we want to ensure my search engine rankings get passed on to my new URLs.
Verify all 301 redirects are working
The last step you’ll want to do if you are changing your URL structure is to verify all your old links are properly being redirected to your new links. This can be done by clicking a few of your old links and ensure they get properly redirected. Eventually Google will update it search index to drop your old links and replace them with your new ones.