Mayank Pathak
Mayank Pathak

Reputation: 3681

Can we create subdomain URLs without actually creating a subdomain in asp.net?

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.?

Upvotes: 1

Views: 1475

Answers (1)

Captain Kenpachi
Captain Kenpachi

Reputation: 7215

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

Upvotes: 1

Related Questions