The Redirect View allows you to use information from a Query to determine where a visitor to a page will be redirected.
- Create a Query which contains a link to the destination page – ie where the redirect should redirect to.
- Create a Redirect View, and configure it to use the Query, and to use the field with the link.
- Embed the Redirect View on a page
Now, when someone visits the page, the Redirect View will take them to the other page instead.
The Redirect View only operates if it returns a single record. (after all, you can only redirect to one page at a time). If in doubt, first embed a Table View of the same Query, and see which records are shown. If just one record is shown, change it to a Redirect View, and it will work. However if multiple records are shown, you need to change either the link to the page, or the fields available in the Query to be used as criteria, to enable it to restrict to just one record.
Note, when configuring the Redirect View, you need to specify the "Source Field" that specifies the destination. You have a choice of redirecting to the "Source Field's Content" (ie the text shown for that field if you were to view it in say a grid view), or the "Source Field's Link Target" (as defined by the On Click dialog in the query)
The Redirect View can be used for a variety of tasks where the URL that people are being taken to needs to be changed:
Search Engine Optimisation
If the old page has been replaced by another one as part of a Search Engine Optimisation process, you can use a Redirect View to move traffic that is linking to the old page for legacy reasons (out of date links, favourites, etc) to the new page. For this purpose set the Redirect View to use a 301 Permanent Redirect (via the Behavior Editor of the Redirect View).
Note: You may want to consider using the Canonical tag for this purpose – whilst it doesn't redirect, the Canonical tag prevents search engines seeing duplicate content.
If you want to provide links to external sites, but wish to log the link traffic, you can link to a page in your site, and use a Redirect View to redirect away. The action will be recorded as a page hit on the page the Redirect View is embedded on (and, naturally, by the destination page). For this type of redirect you should set it to be a 302 Temporary Redirect (via the Behavior Editor of the Redirect View)