Skip to content

Handling Redirects

Desislava Mihaylova edited this page May 27, 2022 · 2 revisions

You have to use redirects when the file name, slug, or path of an article has been changed for some reason.

To handle this scenario use the previous_url property.

Example 1: Using the previous_url property
---
title: Overview
page_title: Getting Started Overview | RadSplitter for ASP.NET AJAX Documentation
description: Overview
slug: splitter/getting-started/overview
previous_url: controls/splitter/getting-started/getting-starter-overview
tags: overview
published: True
position: 0
---

Note that comma characters in previous_url are considered incorrect and are not supported. If you need to redirect a comma-containing previous_url value, either leave the article without a redirect or build and commit a rule directly in the web.config file.

As shown in Example 1, the path set to the previous_url property has to exclude only the host and base url of the URL. Therefore, if the old URL is:

http://host/devtools/aspnet-ajax/controls/splitter/getting-started/getting-starter-overview

the value to be used will be:

/controls/splitter/getting-started/getting-starter-overview

Note that multiple redirects are not supported. This means that:

  • A single article can be redirected to a single article, not to many, that is, a given previous_url value can be present on only one file.

  • Several articles cannot be redirected to a single article. If you need such a rule, build and commit one in the web.config file. Most likely, you will be able to handle an entire folder redirect with a single rule.