0

I have a web site with a content management system. I want to redirect a URL say http://www.example.com/somefolder/somepage/ to different subdomain http://my.example.com

This can be easily achieved using URL alias. But I want to mask the rewritten URL, means in the browser address bar I want to display my.example.com (instead of http://www.example.com/somefolder/somepage/).

Is this something I can do in IIS?

Thanks

Tippu
  • 1,191
  • 4
  • 16
  • 36
  • The URL `http://my.example.com` will have a single page or will it contain a website? E.g. there will be a URL like `http://my.example.com/somepage`? And if yes, what will the actual URL be? – Tasos K. Nov 02 '14 at 14:03
  • http://my.example.com will be just a single page. – Tippu Nov 03 '14 at 10:38

2 Answers2

1

This is a classic example of a reverse proxy - you can do this within iis - see this article http://weblogs.asp.net/owscott/creating-a-reverse-proxy-with-url-rewrite-for-iis

Symeon Breen
  • 1,531
  • 11
  • 25
0

Depending on your requirements, but you could use Server.Transfer() instead redirect.

It has some limitations; there is an explanation in this question: Server.Transfer Vs. Response.Redirect

Limits include:

Response.redirect() can be used to redirect user to any page which is not part of the application but server.transfer() can only be used to redirect user within the application. I am not so comfortable with the use of subdomains in one application so I cannot tell you directly if a subdomain can be in the same application or not.

Community
  • 1
  • 1
Pleun
  • 8,856
  • 2
  • 30
  • 50