【发布时间】:2023-04-09 05:22:01
【问题描述】:
我正在使用 asp.net 4.5。我像以前一样在 IIS 中创建了一个应用程序“MySite”,但路径与以前不同。
我的代码上有这样的 img 标签
<img src="/images/apple.jpg" />
IIS 7.5 : http://localhost/images/apple.jpg
IIS Express : http://localhost:10753/images/apple.jpg
Web Server : http://examplesite.com/images/apple.jpg
我想要什么:
http://localhost/MySite/images/apple.jpg
我得到了什么:
http://localhost/images/apple.jpg
如何在 IIS 7.5 中将默认根路径设为“mysite”?
谢谢
【问题讨论】:
标签: c# asp.net iis iis-7.5 asp.net-4.5