VIP has a couple of helper functions for broader redirects.
- vip_regex_redirects — advanced 301 redirects using regex to match and redirect URLs. Warning: Since regex is expensive and this will be run on every uncached page load, you’ll want to keep this small, lean, and mean.
- vip_substr_redirects — wildcard redirects based on the beginning of the request path. This is basically an alternative to
vip_regex_redirects()for when you only need to redirect /foo/bar/* to somewhere else. Using regex to do this simple check would add lots of overhead.