Skip to content

Instantly share code, notes, and snippets.

@owenconti
Last active May 19, 2020 03:12
Show Gist options
  • Save owenconti/2f11032e2844feb36a8c7e9343e076d6 to your computer and use it in GitHub Desktop.
Save owenconti/2f11032e2844feb36a8c7e9343e076d6 to your computer and use it in GitHub Desktop.
Setting up dynamic HTTP redirects with Statamic v3
'/some-old-slug' => '/new-slug'
title: Redirect
sections:
main:
display: Main
fields:
-
handle: redirect_location
field:
characterlimit: 0
type: text
localizable: false
display: 'Redirect URL'
validate: required
{{ redirect to="{{ redirect_location }}" }}
title: Redirects
route: '{slug}'
layout: redirect
blueprints:
- redirect
revisions: false
sort_dir: desc
---
title: RSS
entry: 65ede336-9f41-4b20-bae3-cd3cd9435d24
updatedby: 197c1509-8dff-4d72-9898-334084519619
updatedat: 1578797584
redirect_location: /feed
id: f358bf66-3972-4800-864f-aa42eeb7aee4
---
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment