1

Is this possible to mimic URLs in Asp.net without actually creating a sub domain. Is this possible using URLRewriter. I've to use URLRewriter only. I'm using asp.net 4.0 and IIS 6. So i won't user IIS 7's URL rewriting extensions..

For example : URL : example.com?value=somecode

and rewrite as : somecode.example.com

I just gone through this link on code project. I just don't know how to implement in project.

Any help is appreciated..!!!

EDIT :

As per Juann Strauss's answer. I'm updating my question now. Is it possible using IIS 7. without actually creating a subdomain.?

Community
  • 1
  • 1
Mayank Pathak
  • 3,621
  • 5
  • 39
  • 67

1 Answers1

1

Nope. Your server won't be listening for requests to somecode.example.com. If you want to do something like that, you're going to have to do scripting on the IIS level rather than on a site level. There's also DHCP configuration to think of.

what you CAN do is route requests for example.com?value=somecode to example.com/somecode

Captain Kenpachi
  • 6,960
  • 7
  • 47
  • 68
  • If on server level..than how..? – Mayank Pathak Mar 11 '13 at 09:11
  • Honestly, I am not quite sure. It's probably a new question you should pose. But you can try working through this article first: http://www.webmasterworld.com/microsoft_asp_net/3194877.htm – Captain Kenpachi Mar 11 '13 at 10:54
  • The reason I said to ask a new question is because your's has fallen off the front page by now, so I don't think anyone will see it for a long time. – Captain Kenpachi Mar 11 '13 at 11:33
  • Okay..here's my new question with a bounty offered : http://stackoverflow.com/questions/15248094/how-to-rewrite-querystring-url-as-subdomain-in-asp-net – Mayank Pathak Mar 11 '13 at 11:34