I'm building out a new site and have moved all the existing client asset upload directories into one parent directory.

old site:




new site:




When adding a redirect in retour how can I set up a regex to catch all images/files in the various directories and point them at the new structure.


Unless absolutely everything has been moved to /uploads/ (which is unlikely), the easiest way to do it is with 3 regex's:

/hero/(.*) -> /uploads/hero/$1

/books/(.*) -> /uploads/books/$1

/slider/(.*) -> /uploads/slider/$1

vide: regexr.com

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.