0

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

old site:

/hero/

/books/

/slider/

new site:

/uploads/hero/

/uploads/books/

/uploads/slider/

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.

0

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

| improve this answer | |

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.