Last active
May 19, 2020 03:12
-
-
Save owenconti/2f11032e2844feb36a8c7e9343e076d6 to your computer and use it in GitHub Desktop.
Setting up dynamic HTTP redirects with Statamic v3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'/some-old-slug' => '/new-slug' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Redirect | |
sections: | |
main: | |
display: Main | |
fields: | |
- | |
handle: redirect_location | |
field: | |
characterlimit: 0 | |
type: text | |
localizable: false | |
display: 'Redirect URL' | |
validate: required |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{{ redirect to="{{ redirect_location }}" }} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
title: Redirects | |
route: '{slug}' | |
layout: redirect | |
blueprints: | |
- redirect | |
revisions: false | |
sort_dir: desc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
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