URL Rewriting from subdomain to maindomain

Hi Friends,

I have a scenario to redirect my subdomain to main domain without changing the subdomain URL.

I have a subdomain like blog.example.com whenever I type this URL into my browser it should load the content from https://www.example.com/blog but the URL should not change.

Let me know is there anybody implemented this.

Thanks in advance.