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.

1 Answer 1

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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