开发者

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

开发者 https://www.devze.com 2022-12-30 17:37 出处:网络
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:

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 subdo开发者_StackOverflow社区main.


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


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 :)

0

精彩评论

暂无评论...
验证码 换一张
取 消