How do I create this 301 redirect structure?

On our websites, we have a global version, which holds many of the resources, and many locale versions (eg /en-uk) in their own languages.

These are run out of a common templating system (not my area) and server sided.

The issue we are facing is that when a user is on the locale site and they click on a resource to view through a modal, it loads it to the path for the local site, where the resource is not stored, as its stored on the global site.

For example when on the locale website, we want to go to this url
www.example.com/teaching/c-l156 <----- This is ok and good The link redirects to the main teaching site

The below examples are bad because there are no resources at these endpoints.
www.example.com/en-vn/teaching/c-l156 <------ This is bad
www.example.com/en-ca/teaching/c-l156 <------ This is bad
www.example.com/ja/teaching/c-l156 <------ This is bad
www.example.com/en-in/teaching/c-l156 <------ This is bad

How can we construct a 301 that catches all versions of the bad, and redirects to a version of the good?

Hey there,

The redirection you want to implement should be possible using a Bulk Redirect Rule. I would recommend taking a look at the following documents: