Redirects & Friendly URLs with SDL Tridion

Posted on Posted in SDL Web (SDL Tridion)

Redirects and friendly URL’s have been required in almost every project I have ever worked on. Whether it is to handle legacy URL structures or new marketing initiatives URL manipulation is a must.

Here is a quick guide to show how simple it can be to implement in SDL Tridion using the IIS URL Rewrite extension.

  1. Install the IIS URL Rewrite extension on your content delivery server(s) (plan this install through environments to avoid delay’s later)
  2. Create a simple new Schema “URL Rewrites” to allow editors to create rewrite rules with a required text field for from address and to address (Optionally add a description field to make it easier to maintain the URL’s going forward)
  3. Update your Web.Config to include a rewrite section as below (I prefer including the rules outside of Web.Config to avoid unexpected Application Pool recycles)
  4. Create Component Template (using Razor Mediator, including forced redirect to HTTPS)
  5. Create Page Template (using Razor Mediator)
  6. Create test Component and Page (preview Page to check templates are working and outputting in the correct format)
  7. Publish Page
  8. Restart the Application Pool
  9. Test

Leave a Reply

Your email address will not be published. Required fields are marked *