michael419 / xperience-community-redirects

Adds a module to the Xperience by Kentico administration interface to enable the management of URL redirects for website channels
MIT License
2 stars 0 forks source link

Xperience Community: URL Redirects

Description

Adds a module to the Xperience by Kentico administration interface to enable the management of URL redirects for web pages in website channels.

Screenshots

Once installed, a new Redirects app appears on the in the Content management section of the navigation and dashboard (shown below) in the adminstration interface.

Xperience by Kentico Redirects app

Navigating to the app presents a list of redirects.

Xperience by Kentico redirects module listing

Clicking New redirect will enable you to create a new redirect, entering the source URL and then selecting relevant target web page that users should be redirected to. Note that when more than one web channel is present, the page selector enables users to switch to the relevant web channel content tree via the drop-down, highlighted below.

Creating a redirect in the Xperience by Kentico redirects module

Redirect functionality

Library Version Matrix

Xperience by Kentico version Library version
>= 29.5.0 1.0.0

Dependencies

Package Installation

Add the package to your application using the .NET CLI

dotnet add package XperienceCommunity.Redirects

Quick Start

  1. Install NuGet package above.

  2. Register the Redirects service using builder.Services.AddXperienceCommunityRedirects():

    // Program.cs
    
    var builder = WebApplication.CreateBuilder(args);
    
    builder.Services.AddKentico();
    
    // ...
    
    builder.Services.AddXperienceCommunityRedirects();
  3. Register the Redirects middleware using app.UseXperienceCommunityRedirects():

    var app = builder.Build();
    
    app.UseKentico();
    
    // ...
    
    app.Kentico().MapRoutes();
    
    app.UseXperienceCommunityRedirects();
  4. That's it, launch your website and the module will be installed ready to go! Once you've created your first redirect, give it a test in your browser. Happy redirecting!

Contributing

Feel free to submit issues or pull requests to the repository, this is a community package and everyone is welcome to support.

License

Distributed under the MIT License. See LICENSE.md for more information.