Drupal url_alias partially change
Posted on 2014-01-10
How to change url_alias partially according to a pattern?
We have site with reports to users.
We continue to update the reports with new content node but the url_alias kept same.
Users bookmark the pages. So they can get into the reports directly.
Recently we change the path pattern with /docs/ in front:
Now the new content nodes go to these url_alias.
But the users have booked mark the pages.
So we want to make them previous book marks, url_alias, can be redirected into the new path.
<site>/report/report_a to be redirected into <site>/docs/report/report_a
<site>/report/report_a/subreport_1 to be redirected into <site>/docs/report/report_a/subreport_1
That means to make /report/* paths to be redirectly to /docs/report/* paths
Here * is wildcard.