Thanks for sharing your codebase.
If I wanted to rewrite all traffic from my.foo.com to sites.bar.com, how would I do that?
ex:
https://my.foo.com/abc to https://sites.bar.com/abc
https://my.foo.com/xyz to https://sites.bar.com/xyz
*note the SSL is required
Thanks!