Redirects
Redirects are used to send users who are going to outdated URLs to a new, more appropriate URL. In GW Drupal, redirects can be set up using the URL redirects tab on individual content entry pages or you can manage multiple redirects using the URL redirects list.
For instance, if a website no longer exists at a specific web address, users can be automatically redirected to the new web address.
Creating Redirects on Individual Pages
This method will create a redirect from the desired redirect URL to the page you are editing.
- In the Sidebar settings panel, click on the dropdown for URL Redirects
- Click the Add URL Redirect button on the + Add URL redirect to this node text link to create a new redirect
- Type or paste in the end portion of the old page link (i.e. what comes after .gwu.edu/) into the From field
- The To field will be prepopulated with the Node ID of your page
- Select the appropriate option from the Redirect Status dropdown
- Click the Save button
Creating Redirects from the Drupal Admin
This screen allows you to manage all redirects configured on your site and see a count of how many times each redirect URL has been visited.
- Hover over Configuration > Search and Metadata
- Click on URL Redirects
- Click the +Add Redirect button
- In the From field, type or paste in the end portion of the old page link (i.e. what comes after .gwu.edu/)
- In the To field, type or paste in the destination link
- this can be the Node ID for a page on your website
- the full URL for a page on your website or a completely different website
- use /front to redirect to your GW Drupal homepage
- Click the Save button
Repeat these steps for any additional redirects needed.
Redirecting Document Links
Redirects can also be created if a document link changes.
Note: If there are special characters in the document filename such as spaces or parentheses, they will appear in your web browser as "%20" or similar. For example, a file named "My File (1).pdf" will appear in your web browser as "My%20File%20%281%29.pdf".
If the URL you wish to redirect (or redirect to) includes these codes, use the original filename when creating the redirect, for example: https://example.gwu.edu/My File (1).pdf
In general, we recommend avoiding filenames with spaces and special characters other than dash (-) or underscore (_).