URL Redirects Module in Sitecore

In one of my projects, my client's requirement was to implement the URL Redirect feature from his existing SharePoint website to the New Sitecore website. My client suggested the "Constellation.Feature.Redirects" Redirect module to accomplish the functionality. 

In this blog, I am giving insight on this module installation, what features I have used and the challenges I have faced during implementation. I want to give a huge thanks to Richard Cabral aka Sgt Sitecore who guide and helped me with the implementation.

Installation:

To install the URL redirect module please find below the link in which all the steps are mentioned in detail: Constellation.Feature.Redirects

Steps: Constellation.Feature.Redirects are managed via NuGet.

In Visual Studio, fire up the Package Manager console and install it into a Web Application project:

PM:> Install-Package Constellation.Feature.Redirects

After installation, you must build and deploy your solution. You must then immediately run your Sitecore install to make sure the attached Items get added to your databases.

I have installed below URL Redirect module with the new Sitecore 9.3 Instance. On successful installation, it shows the Redirect Manager in the Desktop icons.

URL_Redirect_1

I have added a few Redirect URLs as below:

URL_Redirect_2

And after that, I have performed the below functionality and it’s working fine:

  1. New items: When you select the new icon button then it will open a popup window for a new redirect item. Fill in all the details and select the Ok button:

    URL_Redirect_3
  2. Edit Items: When you select any of the items and click on the edit icon it will ask you for the confirmation message and show you a popup as below:

    URL_Redirect_4
  3. Export: On selection of Export icon, it will ask you to export all redirect items to CSV file. Select the Ok button and CSV file download will start.
    URL_Redirect_5
  4. Import: Click on the Import icon, it will ask you to choose a file and upload it. Once you will upload the CSV file in the same format which you downloaded from the export option, it will import all the redirect URLs in Sitecore.
    URL_Redirect_6
  5. Publish: To publish all the redirect URL’s go to the Sitecore content tree and find items on the path:  /sitecore/system/Modules/Constellation
    Publish all the items and it will index all redirects items.
    URL_Redirect_7
  6. Index: From the Sitecore Desktop icon select "Control Panel":

    URL_Redirect_8
    It will redirect you to the Control Panel section of the Sitecore instance. Click on the “Indexing Manager” under the "INDEXING" tab:

    URL_Redirect_9
    It will open an indexing manager popup for you and allow you to rebuild the indexes in Sitecore.
    Select the Marketing Indexes of the Web Database and click the "Rebuild" button:

    URL_Redirect_10
    Once your index rebuilds success, you can check your redirect URL.
  7. Redirects: Hit the Old URL into the browser and it will redirect to the New URL.

Notes: 

Below are points we need to take care of during the setup of the module:

  1. All config files related to this module should exist at the "~\App_Config\Include\Constellation" path.
    • Constellation.Feature.Redirects.config
    • Constellation.Foundation.ModelMapper.config
    • Constellation.Foundation.PackageVerification.config
  2. URL redirect resolver pipeline should be executed before any Page Not Found resolver’s pipeline.

    URL_Redirect_11
    Workaround:

    URL_Redirect_12
  3. Xconnect marketing service should run.
  4. Rebuild marketing index 
  5. "Website.config" should have "target" hostname and "schemes" tag in Sites tag.

    URL_Redirect_13URL_Redirect_13
  6. Last but not least If you are using a bucket in your Sitecore Content Tree then you need to update the below query code in the existing module:
    Existing code: If your bucket in Sitecore Tree is with Time

    URL_Redirect_14
    In my case Bucketing was not with time and only with Year, month and date so I have update the existing code:

    URL_Redirect_15

Reference: https://constellation4sitecore.com/feature/redirects/

Happy Sitecoreing ðŸ˜Š

Comments

Popular posts from this blog

Sitecore Installation Error: Failed to Start Service 'Sitecore Marketing Automation Engine'

Import CSV Data in Sitecore Using PowerShell: Part-3

Sitecore : The database principal owns a schema in the database, and cannot be dropped message