Create subdomains during registration

I am creating a website where businesses can register for their own account, which should be located at http://businessname.example.com with "businessname" changing every time.

I want to do this on a Windows server (IIS 7), but I don’t know how to do it.

+5
source share
4 answers

First you need to configure the DNS server to resolve * .example.com to the IP address of your server.

Then you have two options:

+3

http://forums.asp.net/t/874598.aspx

DNS (, ISP) " ", *.mydomain.com β†’ myIP

. 1     script, 1 IIS β„–2     url_rewrite script, URL- .

2, , , ( 1).

url iis7: http://learn.iis.net/page.aspx/460/using-url-rewrite-module/

URL- Microsoft IIS 7.0 , URL-, , > :

  • URL -;
  • URL- HTTP ;
  • -;
  • - URL .

URL , , URL . ( ), , .

+5

, ( ) , IIS . IP- , 80 ( , ), . , 1000 , 1000 "", /.

, , , , #...

http://forums.iis.net/t/1151463.aspx

+3

:

  • DNS
  • Using the IIS API to add host names to a domain, for example. businessname.domain.com
  • Software impersonation (since this code requires a higher level of privileges to use the IIS API than just NETWORK SERVICE

After you programmatically add a host name, wildcard matching allows you to resolve it.

The Rewrite URL option will be cleaner, but with a physical domain you can offer FTP access and other things, as it will be a complete domain.

Andrew

0
source

All Articles