I want to handle this:

`blog.example.com => example.com/blog`

`blog.example.com/xxx => example.com/blog/xxx`

in both samples there is nothing in blog subdirectory, and the code which should handle the blog is in subdomain. and just i want to show the url as showed above.

so. i want to forward(redirect without changing url) a subdirectory to subdomain.

is there any nginx configuration to do that?