gpt4 book ai didi

iis-7 - 在注册时创建子域

转载 作者:行者123 更新时间:2023-12-04 17:14:04 26 4
gpt4 key购买 nike

我正在建立一个网站,企业可以在该网站上注册自己的帐户,该帐户应位于 http://businessname.example.com。 “企业名称”每次都在变化。

我想在 Windows 服务器(IIS 7)上执行此操作,但不确定如何执行。

最佳答案

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

If your DNS provider (ie. ISP) have "wildcard" option you could set *.mydomain.com -> myIP

Next step. Option #1 Make a script that creates 1 sites for each subdomain in IIS Option #2 Make a url_rewrite script that rewrites urls to correct folder on-the-fly.



选项 2 可能是您正在寻找的(强烈推荐并首选选项 1)。

更多关于 iis7 url 重写的信息: http://learn.iis.net/page.aspx/460/using-url-rewrite-module/

The Microsoft URL Rewrite Module for IIS 7.0 provides flexible rules-based rewrite engine >that can be used to perform broad spectrum of URL manipulation tasks, including, but not >limited to:

  • Enabling user friendly and search engine friendly URL with dynamic web applications;
  • Rewriting URL’s based on HTTP headers and server variables;
  • Web site content handling;
  • Controlling access to web site content based on URL segments or request metadata.


url 重写选项使拥有数十万家公司变得容易,它们的名称可以从数据库中读取,并且 url 重写将处理重定向。之后,您可以忘记它(在大多数情况下),因为它也将继续为将来注册的所有公司工作。

关于iis-7 - 在注册时创建子域,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1159050/

26 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com