KB URL Redirection: A Step-by-Step Approach
The Redirect Rule comprises two types. They include:
- Full Redirect
- Replace
How to create a full redirect rule
Follow the given steps to create a full redirect rule:
- Navigate to Admin module > Redirect Rules > ADD Rule.
- Select the Redirection Type as Full Redirect.
- In the Redirect From field, enter the full URL or the URL path after the domain that you want to redirect.
- In the Redirect To field, type the full URL or the URL path after the domain that you want to redirect to.
-
For example, you want to redirect to any URL in the knowledge base page.
- Redirect From: https://{domain}/kb/article/1/creating-and-managing-articles
- Redirect To: https://{domain}/kb/article/2/how-to-creating-article
-
Match Query String: If the match query string Boolean property is enabled, the redirect rule will only apply if the query string in the Redirect From URL and Customer Portal URL are exactly matched.
- Redirect From: https://{domain}/kb/article/1/creating-and-managing-articles?isInternalRefresh=False
- Redirect To: https://{domain}/kb/article/2/how-to-creating-article
-
Ignore Trailing Slash: If the Ignore Trailing Slash Boolean property is enabled, the redirect rule will only apply if the Redirect From URL does not contain a slash at the end, and the Customer Portal URL should.
- Redirect From: https://{domain}/kb/article/1/creating-and-managing-articles
- Customer Portal URL: https://{domain}/kb/article/1/creating-and-managing-articles/
Multi-language support in full redirect
-
When multi-language is enabled, you can set the redirect rule for any language.
-
For multi-language enabled need to add the language code.
- For example, you want to redirect to any URL in the Knowledge Base.
- Redirect From: https://{domain}/{language_code}/kb/article/1/creating-and-managing-articles
- Redirect To: https://{domain}/{language_code}/kb/article/2/how-to-creating-article
- For example, you want to redirect to any URL in the Knowledge Base.
-
If the URL does not contain the domain, start with the language code.
- For example, you want to redirect to any URL in the Knowledge Base Page.
- Redirect From: /{language_code}/kb/1/creating-and-managing-articles
- Redirect To: /{language_code}/kb/2/how-to-creating-article
- For example, you want to redirect to any URL in the Knowledge Base Page.
How to create a replace redirect rule
Follow the given steps to create a replace redirect rule:
-
Select the Redirection Type as Replace.
-
Redirect From: Type any part of the URL you want to redirect.
-
Redirect To: Type any part of the URL that you want to redirect to.
-
To redirect to any URL in the knowledge base page, consider the following example. Replace the part /1/creating-and-managing-articles in the customer portal URL with /2/how-to-creating-article.
- Redirect From: /1/creating-and-managing-articles
- Redirect To: /2/how-to-creating-article
-
Match Query String: When the ‘Match Query String’ Boolean property is enabled, the redirect rule will only apply if the query strings in both the Redirect From URL and the Customer Portal URL are an exact match.
- Redirect From: /1/creating-and-managing-articles?isInternalRefresh=False
- Redirect To: /2/how-to-creating-article
-
Ignore Trailing Slash: When the ‘Ignore Trailing Slash’ Boolean property is enabled, the redirect rule will only apply if the Redirect From URL does not contain a slash at the end, and the Customer Portal URL should.
- Redirect From: /1/creating-and-managing-articles
- Customer Portal URL: https://{domain}/kb/article/1/creating-and-managing-articles/
Multi-language support in replace redirect
- When multi-language is enabled, you can set redirect rules for any language.
- To set up redirects for multiple languages, include the language code in the URLs.
- For example, to redirect within the knowledge base page:
- Redirect From: https://{domain}/{language_code}/kb/article/1
- Redirect To: https://{domain}/{language_code}/kb/article/2
- For example, to redirect within the knowledge base page:
- If the URL does not contain the domain, start with the language code.
- For instance,
- Redirect From: /{language_code}/kb/article/1
- Redirect To: /{language_code}/kb/article/2
- For instance,
Note:
- If the URL contains a domain, it will be excluded.
- If the URL does not contain a domain, it must start with a forward slash; otherwise, a forward slash will be added automatically.
- Redirect From URL and Redirect To URL should not be the same.
- In the {domain}, you should replace your domain name; in the {languageCode}, you need to replace the language code you need for redirection.
- In case of replace redirection type, KB should not be replaced in the part of the URL.