【发布时间】:2014-12-09 18:57:59
【问题描述】:
我正在尝试通过我的 mvc 代码重新路由我的 url 请求。在我的本地系统上。我使用 localhost/site,我希望能够使用 test.localhost/site、gain.localhost/site 等,它们都应该指向 localhost/site。如果是的话,C# 或 vb.net 代码示例是否可能会非常感激。过去一周我一直在研究这个问题,真的需要社区的帮助。
【问题讨论】:
-
您能否使用您的主机文件将
test.localhost和gain.localhost指向与localhost相同的IP 地址? -
不。我不知道该怎么做。
-
我已经解决了,谢谢。
标签: c# asp.net-mvc asp.net-mvc-5 asp.net-mvc-routing