Last Updated: 25 Sep 2017
The Remap Manager lists the current remaps (301 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.
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. This is set as a global default and will be used for any sites that don't have a custom Page Not Found asset set on the Site asset.
You can override which asset to use for the Page Not Found for each Site asset 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 and lets you filter the list of displayed remaps.
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 Remaps table, the following information is shown:
- Original 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. The user will be redirected to this Remap URL if they enter the URL listed in the URL field.
- Expires: The date the remap will expiry and be removed from the system. Expired remaps are automatically removed by the Scheduled Jobs Manager.
- Method: The method of how the remap was created. The possible methods are:
- Automatic: The remap was automatically created by Matrix when an asset was moved, deleted, or had its web path changed.
- Manual: The remap was manually added by a user. Either on the Web Paths screen of an asset, or via the Remap Manger.
- CSV: The remap was added via a CSV file upload on the Remap Manager.
- Trigger: The remap was created by a Trigger.
- Delete: Tick this checkbox to delete the remap from the system after saving the screen.
- 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 use the Remap Filters section to filter the list of remaps in the table. Simply enter some filtering options and Save the screen to see a new list of remaps based on your entered filters.
To download the list of remaps as a CSV file, click the Download File button - the file will be downloaded as a .csv file to your computer.
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 pattern to replace the part of the URL matched by the Remap From value.
- Description: Enter a description of the purpose of the Remap Rule. This has no effect on functionality and exists purely for ease of maintenance.
- 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 remaps.
Remap Rules always preserve the scheme portion of the URL (http:// or https://), so you should always omit it from both the Remap From or Remap To patterns.
If I wanted to redirect all pages under matrix-manuals.squiz.net to matrix.squiz.net/manuals (preserving the relative URL path), I could create 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.