Redirects are a tool that site admins can use to automatically direct users from old URLs to new URLs. For instance, if a flier was printed with a particular URL, but the information on that page has been moved to new URL, a redirect allows the old URL to continue to work, so the fliers don't become obsolete.
Unlike Redirect Pages, redirects do not create entries in the site's menu. They're intended to transparently enable the use of old URLs, without exposing those old URLs to new visitors.
Redirecting Single URLs
To make a redirect, log in to the admin console, click the Settings menu in the sidebar, and then select "Redirects".
Then you'll see something like this:
This is the list of redirects on your site. To add a new one, click "Add Path Redirect" or "Add Domain Redirect" in the upper right corner.
If you press Add Path Redirect, you'll be presented with the following form:
The Redirect from path field is for the old URL. In the above screenshot, it's set up to redirect from the old /people/jstock/profile subpage of your site.
If you expect the new URL to change again in the near future, it may be worthwhile to uncheck the Permanent checkbox. But under most circumstances, it should remain checked.
The last two items, "Redirect to a page" and "Redirect to any URL", are mutually exclusive. You should only populate one of them.
If the page you want to redirect to is on the same site, you should use "Choose a Page" to select the page to redirect to. If you use the "Choose a Page", the redirect will always send users to the correct page, even if the destination page is moved to elsewhere in your site's menu.
If you enter a URL, the redirect can lead to anywhere you like, including other websites. For example, you could enter https://archives.caltech.edu to redirect to the Caltech Archives homepage. If you need to redirect to a document or a page with parameters, you cannot use "Choose a Page" to create you the link. You will need to enter the URL in the "Redirect to any URL" field. For example, to link to a subsection of your calendar, you could enter /calendar/filter?past=0&mc=1&sponsors=167. Or if you enter /documents/2643/holiday_observances.pdf, that will create a redirect to the updated URL for that document.
Redirecting from old domains
If you want to do something a little more advanced with redirects, you can use the "Add Domain Redirect" button, instead. You'll be presented with this form:
This will let you redirect users who visit one of your old domains to a specific page on your new site.
For instance, if your site used to be counseling.caltech.edu, but its information has been migrated to wellness.caltech.edu/counseling, you can use a Redirect to automatically send users to the new URL when they visit the old counseling.caltech.edu domain.
To use this feature, you'll first need to add your old site's domain as an Alias in your Site Preferences. Note that this old domain will need to be defunct, because its DNS record will be moved to point to your new site, making the old server inaccessible. You'll need to ask the Caltech Hostmaster to point the old domain to the Caltech Sites server.
Once the old domain name is pointing to your site, you can select the appropriate Alias from the Redirect from domain dropdown in the form.
To implement the redirect mentioned above, start by logging in as an admin to wellness.caltech.edu. Then:
- Create counseling.caltech.edu as an Alias.
- Ask Hostmaster to point counseling.caltech.edu to Caltech Sites.
- Once that's been done, create a new Redirect.
- Select counseling.caltech.edu from the dropdown at the top of the form.
- Select the Counseling Services page from the Choose a Page dialog.