So I have this kind of location: someplacecat.com
Where someplace
is dynamic and differs.
And I want to rewrite it to someplace.ourdomain.com
So I wrote this location block:
location ~ (.*)cat(.*) {
rewrite ^ $scheme://$1.ourdomain$2$request_uri;
}
But I can't get it to match, what am I doing wrong here?