Can someone please walk me through the workflow required to support vanity URLs using IIS 7 and ASP.NET 4.0? What I want to do is be able to handle a request from the browser such as http://john.mysite.com and have it go to and execute my page at http://www.mysite.com/mypage.aspx?id=3. Of course the id would change depending on the url. http://zack.mysite.com might go to http://www.mysite.com/mypage.aspx?id=4.
What I am thinking is I need a database that holds the id’s for zack and john and then I would implement a URL rewriter that would rewrite the url to the actual page (e.g. http://www.mysite.com/mypage.aspx?id=4).
Can someone please tell me if I am on the right track here?
Yes I do believe this can be achieved using the IIS URL rewrite module. Note that ASP.NET does support some custom routing too.