Tuesday, February 21, 2006

hosts.sam

Today I learnt something new, this is not regarding .NET but networking you can say.
We wanted to test our application by creating many subdomains in the pc, ie; our application needed subdomains for proper testing. Something like http://a.rajesh/dd/index.aspx

Just follow the steps below to achieve this.
Open
C:\WINDOWS\system32\drivers\etc\hosts.sam and in the end added the following

127.0.0.1 localhost
127.0.0.1 a.localhost
127.0.0.1 b.localhost
127.0.0.1 rajesh.rajesh
127.0.0.1 a.rajesh

and saved it.
Then open your browser and type http://a.rajesh/dd/index.aspx and there it goes your localhost will work same as the subdomains... :)

No comments: