A redirect page takes web visitors from one URL to another via a refresh-type redirect in a designated folder. The redirect template uses a header redirect to direct web traffic, whether it's from an outdated URL to the new page, a short social media-friendly URL to the actual content page, or to track entry points to the page from different promotion campaigns.
The template provided below creates a folder at the root of the site with an index.html page in it, e.g.
http://www.college.edu/signup/index.html. Even if the URL provided is extensionless (
http://www.college.edu/signup), the index page is loaded by default. Then the redirect in the HTML head of the page sends the user to the actual page at
http://www.college.edu/admissions/recruitment/signup/index.html. Marketing metrics can be tracked by creating different redirects for each marketing outlet (e.g. Facebook, Twitter, Instagram, email).
The redirect is handled via an http-equiv refresh as a meta tag in the head of the false (redirect) page. This can also be used in lieu of manually managing 301 redirects in the .htaccess/web.config file.
Uploading the Template FilesLink to this section
- Download the redirect-template.zip, which contains 3 files:
- Navigate to where the current site templates exist. This is typically
/_resources/ou/templatesbut is specific to each implementation, so yours might be set up differently.
- Upload the zipped template files to this location using zip import.
- Open the redirect.tmpl file in the source code editor.
/go/. This is the folder into which all redirect pages created from this template will be placed. If desired, you can replace the path with another folder - the naming is arbitrary.
- If desired, edit the wording of the content in
<body>. This is the text seen by web visitors if the meta refresh does not occur for any reason.
- Save and close the file.
By default, this template creates a page with a header redirect to the URL without any set delay. A delay in seconds can be added by changing the numerical value of the
content attribute, e.g.
content="5". Text can adjusted to provide a message to visitors.
The TCF file can be edited to specify the default file for a redirect file if it is not
index.html. For example, if the web server is configured to serve default.asp, then the
filename attribute of the template node can be changed to "default" and the
extension attribute to "asp."
Using the TemplateLink to this section
If you have template groups set up, you may need to add the redirect template to a group so it is available for you to test out.
- Navigate to Content > Pages.
- Click +New.
- Choose the "New Redirect" template.
- In the "Original File" field, select the page you want the redirect to deliver web visitors to. Make sure to select a page on the production server.
- In the "Short Name" field, name the folder that contains the redirect page. This plus the path defined in the template will become the URL of the redirect page.
- Click Create. You will be taken to the edit view of the new redirect page.
- Verify that is page source code is correct.
- Publish out the changes, if any.
- Navigate to the URL on the production server where the redirect was created to verify that the redirect is working correctly.
Updating a RedirectLink to this section
Should you need to modify an existing redirect, you can:
- Rename the folder containing the redirect page, thereby updating the URL used for the redirect. However, be aware that anyone using the previous redirect URL will now see a 404 error when they go to that page. This is especially a consideration when the redirect URL is used in print media (such as posters or brochures) and cannot be updated.
- Create a second redirect file, with a new URL, that points to same destination page. Leave the initial redirect up to prevent 404 errors.
- Edit the redirect file source code and modify
<meta http-equiv="refresh"with the updated URL. Republish the the redirect file.
After any change, navigate to the URL on the production server where the redirect was modified to verify that the redirect is working correctly.
.htaccess RedirectLink to this section
On an Apache web server, the
.htaccess file at the site root can be modified with 301 redirects. Use the following lines to make sure the rewrite module is configured:
Options +FollowSymLinks RewriteEngine on
Then for each redirect, specify first the site root-relative URL you want to redirect from, and then the destination URL. E.g:
Redirect 301 /redirect.html http://gallena.edu/about/index.html
web.config RedirectLink to this section
On an IIS web server, the
web.config file at the site root can be modified with 301 redirects. Due to the variations of IIS versions, it is best to consult with the IIS documentation for your specific version on how to add 301 redirects into the