There are two main methods for re-directing users:
1. By setting up a Page Redirector via the the Dashboard (admin users / clients can do this easily).
2. By adding some code into the content of a page.
Content vs Redirection
Before setting up a page redirector, consider that a page with content is a far better contribution to a website than a page created with the intention of simply redirecting a user to another page.
A good example is the "services" page of a website. Consider the following scenario of an accounting website:
- Personal Accounting
- Business Accounting
- Financial Planning
1. Configuring A Page Redirector
To add a new re-director, navigate to:
Dashboard > Pages > Redirectors > New Redirector.
This page will allow you to specify the page which will redirect the user, and the page which the user will be redirected to.
If the page will appear as an item in the navigation menu, tick the option "Visible In Navigation".
This page also gives the option to specify an "Expire After" time, which is the number of days of inactivity required before the redirector is removed. If this field is set to 0, the redirector won't expire.
The redirection mode should be set to 301 in most cases.
2. Hard-coded Page Redirection
To hard-code a page to automatically redirect the user to an alternate page, do the following:
1. Edit the page, this can be done by clicking the page through the "Pages" admin panel.
2. Open the page source editor by clicking the "Source" button, located in the left sidebar.
3. Add this code into the HTML page source, replacing '/about-us/' with the page id you would like to redirect the user to:
4. Save the page by clicking the "Save Page" button located in the top left side of the screen.
Alternative Hard-coded Redirection Method:
The solution above is preferable, because the re-direct code will be visualized in the editor - making it obvious to other admins in the future. However as an alternative approach, you can substitute the 3rd step above with the following code, pasting it into the PHP tab, rather than the HTML tab:
You can also further extend this example, to only re-direct users in specific cases (such as if they're not logged in as an administrator):