Manage redirects from a single file for static hosting.
If you're using a hosting provider that doesn't offer built in redirect support you can use this plugin to create static HTML files with the redirect meta tag.
npm install --save gatsby-plugin-redirects
// gatsby-config.js
module.exports = {
plugins: [
'gatsby-plugin-redirects'
]
}
Then create a redirects.json
file in the root of your project:
[
{
"from": "/old/path",
"to": "/new/path"
}
]
MIT