Need help to rewrite subdomain urls to the primary domain

What is the name of the domain?

blog.example.com, example.com

What is the issue you’re encountering

i need to rewrite subdomain urls to the primary domain. Like blog.example.com/news/$ will show as example.com/news/$. The domain and subdomain are on different servers. Regex_replace it seems does not work with subdomains so wondering if there is another way to do it?

What steps have you taken to resolve the issue?

I have tried using regex_replace but i am not sure regex_replace works with subdomains

Try this one example here redirect subdomain to root domain.

This topic was automatically closed after 15 days. New replies are no longer allowed.