For all kind of vanity URL redirection we are using URL Rewrite module in our sitecore project which is running fine. For Ex:
CASE 1
Input URL: www.mysite.com/history
Target URL: www.mysite.com/page1/page2/history --> This is handled by URL Rewrite module
Now we have to handle sub-domain redirection as given below:
CASE 2
Input URL: location.mysite.com
Target URL: www.mysite.com/locations
Input URL: customerfeedback.mysite.com
Target URL: www.mysite.com/company/department/sales/feedback
How should handle these scenario because sub-domain URLs( location.mysite.com ) are pointing to some other servers which are actually serving the pages right now
As a starting point first of all we have to change DNS mapping of given sub-domain URL so that those can start pointing to www.mysite.com Load balancer IP address
What would be the next step. Assuming we might need to write down some custom code for this
UPDATE: See below Input/Target URL configured in Sitecore and redirection using sitecore URL rewrite module feature
UPDATE 3/25/2018
DNS level changes has been completed. I can see see location.mysite.com is pointing to same IP as mysite.com.
URL Rewrite changes has been published from CM instance. see below all settings
location.mysite.com binding has been added in IIS. While browsing location.mysite.com getting below error. Might be I'm missing something.