Sadegh
Sadegh

Reputation: 4341

subdomain with rewriteModule

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

Upvotes: 1

Views: 116

Answers (1)

SqlRyan
SqlRyan

Reputation: 33944

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.

Upvotes: 1

Related Questions