tags:

views:

34

answers:

1

hi i'm using this rule for rewriting subdomain

and i'm corrected host file to

127.0.0.1 domain.net

when user typed news.domain.net/default.aspx it must return domain.net/news/default.aspx but browser showed Address not found.

how do i?

please help

thanks all

+1  A: 

When you add the entry to your HOSTS file, it will only correct the exact DNS lookup - in your example, "Domain.net" would resolve to 127.0.0.1, but "news.domain.net" won't resolve to anything, since there's no server at that address. If you add an entry to your HOSTS file for:

127.0.0.1 news.domain.com

That will resolve that domain to your local machine, and then you can configure IIS to rewrite that URL to whatever you want.

rwmnau