Last Updated: 10 Feb 2017
The Remap Manager lists the current remaps or redirects that exist in the system and allows you to manage this list. It is located under the System Management Folder in the Asset Map, as highlighted in the figure to the right.
Management of the remaps is done on the Details screen of the Remap Manager, which is explained in this chapter. For more information on the History and Logs screen, refer to the Asset Screens manual.
The Details screen of the Remap Manager allows you to view the list of the current remaps in the system, delete and add remaps and set a system wide 404 page not found asset.
Please note that remaps in the Remap Manager are HTTP 301 Moved Permanently redirects.
404 Page Not Found Remappings
This section allows you to select the asset, which will be displayed for all Sites in the system when the user enters an incorrect URL. For example, say the URL of a Site is www.example.com and there is a page under that Site that has the URL www.example.com/contactus. If the user enters www.example.com/conactus they will see the 404 Page Not Found asset instead of a blank page.
You can override which asset to use for the 404 page not found for each Site in the system. For more information on how to do this, refer to the Core Assets manual.
This section lists all of the current remaps that exist in the system. The Remapped URLs section of the Details screen is shown in the figure below.
By default, Squiz Matrix automatically creates a remap when you change the web path of an asset or move an asset. You can also create a remap when you delete an asset or by using the fields available in Add New URL Remappings section of this screen.
For each remap listed in the grey box, the following information is shown:
- URL: This shows the old URL of the asset. When a user enters this URL, they will be taken to the URL listed in the Remap URL field.
- Remap URL: This shows the new URL of the asset. The user will be redirected to this Remap URL if they enter the URL listed in the URL field.
- Expires: This shows the expiry date of the remap. If Squiz Matrix has created the remap, the remap will not expire.
- Type: This shows whether a remap is user-created or if it has been automatically added by the system. If Squiz Matrix has created the remap, it will be listed as an Automatic remap. If the remap has been created by a user, it will be listed as a Manual remap.
- Delete: To delete a remap from the list, click the Delete box for that remap and click Commit. You can delete all remaps in the system by clicking the Delete checkbox at the top of the column.
- Never Delete: Select this to lock the remap from deletion. If selected, this entry will be unable to be deleted until the Never Delete option is deselected. You can select all remaps in the system by clicking the Never Delete checkbox at the top of the column.
To filter the list or to find a specific remapped URL, you can use the Original URL Filter and Remapped URL Filter fields. The Original URL Filter field will search the URL values and the Remapped URL Filter field will search the Remap URL values. Once you have entered the values to filter by, click Commit. The remap list will be updated to only show the remaps that match the criteria entered.
To delete the remapped URLs listed in this section, select the Purge All Remaps field and click Commit. All remaps in the system will be purged, except those marked as Never Delete.
To download the list of remaps as a CSV file, click the Download File button - the file will be downloaded to your computer. Please note that the downloadable CSV file will reflect any remap filtering that has been configured. An example of the Remap Entries CSV file is shown in the figure below.
Add New URL Remappings
The Add New URL Remappings section allows you to add new remaps to the system.
Please note that by default, if you move the asset or change its web path, Squiz Matrix will automatically create a remap.
To add a new remap, fill out the following fields:
- Old URL: Enter the URL that you want to be remapped.
- New URL: Enter the new URL that the user will be redirected to when they enter the old URL.
- Delete Old URL Remap?: Select if you want to remove an existing Old URL remap so that the new one can be added. This option is applied to both single or CSV Upload file remap addition.
- Never Delete: Select this to lock the entry from deletion. If selected, this entry will be unable to be deleted until the Never Delete option is deselected.
- Expires: Enter the number of days that you want the remap to exist. If you leave this field blank, the remap will never expire.
Alternatively, if you have a number of remaps to create, you can create a CSV file and import it. Each line in the file should contain 4 fields. The first field should be the old URL, followed by the new URL, the expiry date (using the format yyyy-mm-dd hh:mm:ss; if you do not want to specify an expiry date, leave this field blank), and lastly the never delete option (either 0 or 1).
If you have selected to import remap information via an uploaded CSV file, enabling the Column Headings in CSV File? field will indicate to Squiz Matrix that the CSV file being uploaded contains column headers. When this field is enabled, these column header values will be ignored, allowing the system to correctly import the remap information in the CSV file.
Remap Rules allows you to use PCRE pattern matching to apply remaps within Matrix. This is useful for when you want to redirect all pages under a website URL or a section of the site to a new domain or web path section. Standard PCRE functions and delimiters are supported.
To add a new Remap Rule, click on the Add Remap Rule button. A new row will be added to the table where the following fields are available:
- ID: This is the automatically assigned identification number for the Remap Rule. This will be present in the response header of the 301 redirect that Matrix sends out so that you can easily identify which remap in Matrix is causing the redirect on the front end. For example, if the ID is 3, the header will look like this:
- Remap From: Enter a pattern to match URLs you want to be remapped.
- Remap To: Enter a URL to redirect matched Remap From URLs to.
- Description: Enter a description of the purpose of the Remap Rule. This has no affect on functionality and is just available for maintenance purposes.
- Enabled?: Enables you to enable or disable the Remap Rule.
- Delete?: Delete the Remap Rule from the table completely.
- Reorder: Allows you to reorder the Remap Rules by dragging and dropping the row to a different location. The Remap Rules will be evaluated in a top-to-bottom order in the table.
Matrix will evaluate these Remap Rules after all other possible remap
If I wanted to redirect all pages under matrix-manuals.squiz.net to matrix.squiz.net/manuals, I could put a Remap Rule entry with the following options:
- Remap From:
- Remap To:
Remap Execution Order
The order in which URLs and Remaps are executed by Matrix is as follows:
- Matrix authoring and design URLs (/_admin, /_edit, SQ_DESIGN_NAME, etc)
- The frontend asset assigned to the URL
- Individual Remap entries
- Remap Rules
- 404 Page Not Found
This section allows you to control whether or not Squiz Matrix will automatically create a remap when the web path of an asset is changed. You are also able to configure the Never Delete value for newly added remaps.
The fields available in this section are as follows:
- Automatically add remaps when webpath changed?: Select whether or not remaps will be automatically added when the webpath of an asset changes. By default, when the web path of an asset is changed (for example, when an asset is moved), a remap will be created. To stop this from happening, deselect this option. This setting can also be configured on an asset per asset basis on the Web Paths screen. For more information, refer to the Asset Screens manual.
- Automatic Remaps Expiry Time: Enter the duration (in seconds) of how long to keep automatically added remaps for. Only applicable if Automatically add remaps when webpath changed? is enabled. Leave empty to never delete automatic remaps.
- Never Delete added remaps?: Select whether or not remaps will be created as deletable or not. By default, added remaps are created as Never Delete and are locked from deletion until the Never Delete option is deselected. To have remaps added as deletable (Never Delete disabled), deselect this option.
- Preserve query string in remaps?: Select whether or not a query string appended to a URL should be preserved when applying a remap. By default, query strings will be preserved on remaps, except where a trailing question mark (?) is appended to the end of the URL. For example, if the remap rule is that /foo redirects to /bar, enabling this option means that the URL /foo?SQ_DESIGN_NAME=print would remap to /bar?SQ_DESIGN_NAME=print. If this option was disabled, the remap would not preserve the query string and would redirect to /bar.
Let Us Know What You Think
Let us know if you spot any errors or if you have any ideas on how we can improve the Matrix Community Website.
Contact Squiz for Demo
Let us show you the true power of Squiz Matrix by giving you a personalised demonstration.