Creating Redirection Rules

Modified on Wed, 24 May, 2023 at 1:33 PM

You can redirect a request for a URL within your Hub to another URL within or outside the Hub by defining a Redirection Rule. The Redirection rules allow you to seamlessly direct traffic from one URL to another. It is particularly useful for preventing 404 errors and routing visitors to the correct locations on your site.


Redirect Rule with an Example

Let's assume we have a space called "Case Study" that is based on the URL (http://companyhub.com/case-study). The Admin later decides to change the name of the space to "Case Studies" and changes the URL to (http://companyhub.com/case-studies). Most links inside the Hub will automatically be updated to accommodate this change but links from outside the application (such as those cached by Google or by your users' browser bookmarks) will no longer resolve. 


To resolve this discrepancy, navigate to the Hub's Redirection Rules page (Hubs > Redirection Rules) and set up a simple redirection rule that points Source: /case-study to Destination: /case-studies or use a regular expression to set up a new redirection rule that points Source: ^/case-study/(.*)$ to Destination: /case-studies/$1. Now, whenever a user follows a link to (http://companyhub.com/case-study), they will be redirected automatically to (http://companyhub.com/case-studies).


To create a redirection rule:

  1. From the Left Nav Menu, click Hubs.

  2. From the Hubs page, click the Hub.

  3. From the Hubs menu, click Redirection Rules.
     
  4. From the Redirection Rules page, click Add Rule in the upper-right corner of the page
    .
  5. Using the Matches drop-down, you can specify if the path should exactly match what's entered, start with what's entered, or match a regular expression.
     
  6. Enter an URL path in Source. The URL path will be part of the link after your Hub URL.
    An example URL: "hub.mycompany.com/case-studyt", so the path for this URL is "/case-study".
     
  7. Enter an URL path in Destination. Enter the path, the user is to be redirected to.
     
  8. Optionally select Append Source URL Parameters, for the destination, you can specify if parameters from the source path should be added to the destination URL.

  9. Optionally enter extra parameters in the Extra URL Parameters. to be added to the destination URL.

  10. The Enabled option is left as enabled for the redirection rule to apply. Click Save.
     
  11. The redirection rule is created and a confirmation message is displayed.

  12. Optionally, click Change Priority to reorder the redirection rules.

  13.  You can reorder the redirection rules by dragging and dropping them in the desired order and click Save.

  14. The changes are displayed on the Redirection Rules page.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article