I have installed Drupal's Redirect module to redirect from old URL's to new ones. I have added the required redirects in my local environment, ran drush cex
but can not see the redirects in the export directory. Are URL redirects are content and not config? Therefore can not be exported via configuration management and have to be added manually per environment?
-
Yes, redirects are "content".– sonfdJan 21, 2021 at 12:06
-
and have to be added manually per environment? you can script a migration instead, it doesn't have to be manual– Clive ♦Jan 21, 2021 at 12:40
-
see drupal.stackexchange.com/questions/227978/…– 4uk4Jan 21, 2021 at 13:20
1 Answer
Yes indeed. If you wish to carry the redirects around you should probably export
Or manually create the file if they are not too many.
I would recommend a csv file. You can check this for reference How do I export the list of URL alias into an excel or csv?
Then I would write a simple drupal migrate process to re import them in any environment. If you use csv file it should be quite simple for the redirects.