shg
shg

Reputation: 81

What is the recommended approach to add static subdomains to a website?

I would like to create a few static subdomains like:

mycategory.mydomain.com

in a rather small website and would like it to point to the folder:

mydomain.com/mycategory

without showing such redirection in browser address bar.

What is an easiest way to achieve it? I can do it in either IIS settings, asp.net, C# code, etc

I guess there are better ways then creating a few separate Sites in IIS - one for each subdomain.

Upvotes: 3

Views: 391

Answers (2)

Fredrik Johansson
Fredrik Johansson

Reputation: 3535

Setup multiple websites in IIS and assign a unique hostheader to each one of them (mycategory1.mydomain.com, mycategory2.mydomain.com, etc). Point each website to its destination folder.

More about hostheaders:

http://www.google.com/search?q=iis+host+headers

Upvotes: 1

Lex Li
Lex Li

Reputation: 63243

IIS 7 supports URL rewrite better than any previous versions, http://learn.iis.net/page.aspx/460/using-the-url-rewrite-module/

But there are also third party solution.

Like @adrianbanks suggested, serverfault.com is a better place to discuss such configuration only questions :)

Upvotes: 0

Related Questions