Global Redirect

Module Type: 
YaleSites Core
Sitewide Tags: 
URL Aliases

The Global Redirect Module checks urls as they are created, adjusts duplicates and creates an automatic redirect when a URL changes. This prevents broken links when changes to the page names result in a new URL. 

Specifically, the Global Redirect Module

  1. Checks the current page URL for an alias and does a 301 redirect to it if it is not being used.
  2. Checks the current page URL for a trailing slash, removes it if present and repeats check 1 with the new request.
  3. Checks if the current page URL is the same as the site_frontpage and redirects to the frontpage if there is a match.

This module is enabled as part of YaleSites Core and should never be disabled. 

Infinite loop error message

The Global Redirect Module is a convenient tool for redirecting old site URLs to a newly created URL. However, there is a bug that creates some confusion because the redirects happen automatically without any configuration.

The error message that displays is:  

Oops, looks like this request tried to create an infinite loop. We do not allow such things here. We are a professional website!” 

This happens when the page is saved 2 or more times and the final save changes the URL to one that has already been used for the page. So:

  1. yalesites.yale.edu/contact was changed to
  2. yalesites.yale.edu/contact-us, then changed back to
  3. yalesites.yale.edu/contact

Since the first and third URLs are the same, it basically creates a redirect that points to a URL that already exists. 

Solution: just delete all the redirects except for the last one created. 

  1. Click on the Edit tab and scroll down to the Vertical Tabs. 
  2. Click on the URL Redirects tab.
  3. Delete the extra redirects.