XperienceCommunity.Redirects 1.0.3

dotnet add package XperienceCommunity.Redirects --version 1.0.3
                    
NuGet\Install-Package XperienceCommunity.Redirects -Version 1.0.3
                    
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="XperienceCommunity.Redirects" Version="1.0.3" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="XperienceCommunity.Redirects" Version="1.0.3" />
                    
Directory.Packages.props
<PackageReference Include="XperienceCommunity.Redirects" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add XperienceCommunity.Redirects --version 1.0.3
                    
#r "nuget: XperienceCommunity.Redirects, 1.0.3"
                    
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
#:package XperienceCommunity.Redirects@1.0.3
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=XperienceCommunity.Redirects&version=1.0.3
                    
Install as a Cake Addin
#tool nuget:?package=XperienceCommunity.Redirects&version=1.0.3
                    
Install as a Cake Tool

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.

<a href="images/xperience-community-redirects-screenshot-dashboard.jpg"> <img src="images/xperience-community-redirects-screenshot-dashboard.jpg" alt="Xperience by Kentico Redirects app"> </a>

Navigating to the app presents a list of redirects.

<a href="images/xperience-community-redirects-screenshot-listing.jpg"> <img src="images/xperience-community-redirects-screenshot-listing.jpg" alt="Xperience by Kentico redirects module listing"> </a>

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.

<a href="images/xperience-community-redirects-screenshot-create.jpg"> <img src="images/xperience-community-redirects-screenshot-create.jpg" alt="Creating a redirect in the Xperience by Kentico redirects module"> </a>

Redirect functionality

  • The website checks each incoming request URL against a list of predefined redirects created via a custom module.
  • If a match is found, a 301 redirect is issued, and the user is automatically redirected to the target webpage.
  • Redirects are created on a per web channel basis, ensuring that you must select the relevant web channel when choosing the target page.
  • The functionality will attempt to redirect the user to the correct language variant of the target page by analyzing the source URL for the presence of a culture code (e.g. en-GB) or a language name (e.g. en) URL prefix.
  • Users will be redirected based on the target page's canonical URL setting, whether it is the system URL or the vanity URL defined for the page.
  • Only relative URLs are supported for source URLs at this time. Absolute URLs are not supported.
  • The redirects middleware is placed later in the request pipeline than the Kentico middleware, meaning that Kentico's own URL redirect functionality (e.g. former URLs) takes president.
  • By default, redirects are enabled for use with the Continuous Integration and Continuous Deployment features of Xperience by Kentico. This enables developers to prepare redirects in a local development environment, share them amongst other team members working on the same project, as well as deploy them to environments in their deployment pipeline.
    • You can explicitly include or exclude the redirects object type from CI and CD features using the xperiencecommunity.redirect object name in your repository.config files.

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.

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.3 2,601 10/27/2024
1.0.2 143 10/27/2024
1.0.1 173 10/11/2024
1.0.0 157 9/26/2024

Fixed an issue where it was not possible to create redirects