Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.net MVC 中的路由是否/可以查看子域?
即 subdomain1.example.com
ASP.NET SP1 中内置的路由处理程序(请注意,它不仅适用于 MVC)不关心域名,它唯一解析的是根目录之后的内容。例如,如果您的路线是:http://www.foo.example.com/site-root/Controller/Action/id?bar=temp路线处理程序解析出现在站点根目录/之后的内容(注意:您的站点根目录实际上可能是“/”)。希望有帮助
http://www.foo.example.com/site-root/Controller/Action/id?bar=temp