I was already running a sub-website under following path
Now, I have created a sub-domain
Require "web.config" file code that can do 301 in following way
Request Redirect to
--------------------------------------------------------------------------
http://example.com/sub-site/ http://sub-site.example.com/
http://example.com/sub-site/page-1.html http://sub-site.example.com/page-1.html
http://example.com/sub-site/page-2.html http://sub-site.example.com/page-2.html
.
.
.
http://example.com/sub-site/page-N.html http://sub-site.example.com/page-N.html
Basically, rule should be written in such a way that "http://example.com/sub-site/" is changed to "http://sub-site.example.com/" in request, and browser should be redirected to newer location.