Configuring the extension in Magento
The configuration screen for the extension can be found by navigating to System >Configuration > SEO Redirects (under the Catalog tab). You should see the following screen within the SEO Redirects tab (if you see an error page, or anything other then the screen below try clearing cache and logging out and back in again).
Enabled – Set Yes to enable
Use Google Doc – Set Yes if you would like to use this option. Once set to Yes, a field for the Google Docs URL will appear (this is the URL you should get from your Google Doc once published as either html or csv).
Use local file – Set Yes if you would like to upload a csv. Once set to Yes, a template.csv will appear as well as a 'Add File' button for you to upload file.
Serial – If you have a serial key (have purchased additional URLs) please enter it here.
Auto Remove Query Params – This is where you can add values that you would like to be ignored when a query string is being matched.
In the example below, a param of 'page' has been specified.
In the instance that 'www.mydomain.com?page=1&price=100-200' has been requested, and 'page' has been added as a Query Variable to be removed, onlywww.mydomain.com?price=100-200 will be evaluated.
Log 404's – If you would like for all 404's to be logged, set this option to Yes. Once set to Yes, a 'Limit number of 404's logged' will appear. If nothing is set in this field, it will default to 0 which is unlimited (and not recommended). We recommend setting this to 1000 if you are unsure.
Enable Reporting – Enable this option to be sent a report after the scheduled import has ran.
Creating your SEO redirects spreadsheet
After installation, the first step is to create the spreadsheet that you will use to manage your old and new URL redirects. You have a few options as to how you can create your doc:
Using Google Docs, you can create and import a published html or csv file. If you do choose this option, you will need to ensure that the doc is public.
Create and upload a csv from your computer.
You can alternatively download a template.csv from the 'General Settings' tab of the extensions configuration screen (in order to view the template.csv, set 'Use local file' to 'Yes').
In either case, the document layout is very simple, put the old (bad) URL in column 1, and the new (good) URL (where you want the page to redirect to) in column 2 (see below). In column 3 enter the redirect 'type' as either Fixed Query or Open Ended Query (more on this below), and in column 4 whether you would like the 'persist query' to set to either 'Yes' or 'No' (again, more on this below).
You can complete your csv with or without the headings.
You have just created your first 301 redirect.
Important Note: All the configurable options in the Magento backend are 'Store View' specific, so take care when importing your file (e.g. if redirects are applicable to all storeviews you can import at Website scope, or if applicable to all websites you can import at default).
Once you have configured the extension; the next step is to manage your redirections. As Magento already provides some functionality for you to manage redirects, it is important that you understand how the extension will work with, and improve upon the core functionality, which will then allow you to make best use of the extension.
Once your spreadsheet(s) have been saved, you will now need to import the redirections from your spreadsheet into Magento. To do this:
Navigate to Catalog > SEO Redirects > Import. You should see a blank screen (please don't panic) with an 'Imports Redirects' header to the left, and a +Run Imports button to the right. Click +Run Import.
Once you have imported your redirects, you can manage all active redirects by navigating to Catalog > SEO Redirects > Manage Redirections.
Fixed and Open Ended Queries are the 2 different types of redirections. Understanding the difference between the 2 is very important in understanding how to make best use of the extension.
Fixed Query - a Fixed Query will only produce a match when the exact query string is matched.
If 'type' is Fixed Query and your 'from-url' is 'a/?page=1&a=b'
and someone requests either '/a?page=1&a=b' or '/a?a=b&page=1' both will produce a match.
However, if someone requests 'a/a?page=1&a=b&foo=bar', it will not produce a match to your from-url above if set to Fixed Query
Open Ended Query – a Open Ended Query will match the url with the highest number of complete matches.
If 'type' is Open Ended Query and you have 2 'from-url's:
from-url A 'a/a?page=1&a=b'
from-url B '/a?page=1&a=b&foo=bar'
If someone requests '/a?page=1&a=b', it will match to from-url A
If someone requests '/a?page=1&a=b&foo=bar' it will match to from-url B
If someone requests '/a?page=1&a=b&foo=foo' it will match to from-url A
If someone requests '/a?page=1&foo=bar&a=b'&c=d' it will match to from-url B
If the query is Open Ended, there is an added option to 'persist query' string. The query strings from the requested url will then be merged with the query string of the 'to-url' location of the matched redirect
If 'type' is Open Ended Query, and 'persist query' is Yes
from-url is /a?page=1&a=b'
to-url is /b?a=c
If someone requests /a?page=1&a=b&b=d&c=e, it will produce a match because it is an open ended query and it can find a match / or a best match on the first half of the url.
As persist query is set to Yes, the requested url and the 'to-url' will then be merged. The result will then be:
If we deconstruct this, we can see that '/b?a=c from the 'to-url' has been merged with the requested url /a?page=1&a=b&b=d&c=e