2020-07-25 04:38:58 +02:00
|
|
|
module.exports = {
|
|
|
|
async rewrites() {
|
|
|
|
return [
|
|
|
|
{
|
|
|
|
source: '/team',
|
|
|
|
destination: '/about',
|
|
|
|
},
|
|
|
|
{
|
|
|
|
source: '/about-us',
|
|
|
|
destination: '/about',
|
|
|
|
},
|
|
|
|
// Path Matching - will match `/post/a` but not `/post/a/b`
|
|
|
|
{
|
|
|
|
source: '/post/:slug',
|
|
|
|
destination: '/news/:slug',
|
|
|
|
},
|
2020-08-06 00:20:49 +02:00
|
|
|
// Wildcard Path Matching - will match `/blog/a` and `/blog/a/b`
|
2020-07-25 04:38:58 +02:00
|
|
|
{
|
|
|
|
source: '/blog/:slug*',
|
|
|
|
destination: '/news/:slug*',
|
|
|
|
},
|
|
|
|
// Rewriting to an external URL
|
|
|
|
{
|
|
|
|
source: '/docs/:slug',
|
|
|
|
destination: 'http://example.com/docs/:slug',
|
|
|
|
},
|
|
|
|
]
|
|
|
|
},
|
|
|
|
}
|