I’m trying to relocate all the children of the page ‘blog’ to a new page ‘articles’.
I would like to redirect anyone who uses the deprecated ‘blog’ urls, e.g.:
/blog/page redirects to /articles/page
Question is: How do I do this? I can create a route as follows, but I’m unsure how to preserve the url in the redirect, i.e.:
[
'pattern' => ['blog/(:any)'],
'action' => function() {
go('articles/**[HOW DO I PRESERVE THE REST OF THE URL HERE?]**');
}
]
Help much appreciated!