Manage website redirects from a single json file
npm install gatsby-plugin-redirectsManage 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.
``sh`
npm install --save gatsby-plugin-redirects
`js`
// gatsby-config.js
module.exports = {
plugins: [
'gatsby-plugin-redirects'
]
}
Then create a redirects.json file in the root of your project:
`json``
[
{
"from": "/old/path",
"to": "/new/path"
}
]
- https://github.com/getchalk/gatsby-plugin-meta-redirect
MIT