Skip to content

Redirects

Clare Macrae edited this page Oct 7, 2020 · 5 revisions

Contents

Introduction

As the site evolves, pages sometimes move to new locations.

Testing redirects

Check that all the links in this page work, i.e. go to relevant information and do not give 404.

Maintaining redirects

In the destination page, add a redirect_from: line in the front-matter at the top, giving the URL of the old page.

---
layout: home
toc: true
title: Recruitment
redirect_from: "/resources/recruitment/"
---

It is also possible to give multiple values, see this example from Clare's website.

More complicated cases

If there isn't a 1:1 mapping between old page and new, then an intermediate page can be created - so the old page redirects to the intermediate, which contains links to the new locations.

https://www.includecpp.org/resources/new_layout/ is an example of that.