Asp.net 5托管在asphostportal.com上 [英] Asp.net 5 hosted on asphostportal.com
问题描述
我将asphostportal.com上的ASP.NET托管在iis7中配置为应用程序的子目录中。即http://blog.domain.com用户还可以通过http://www.domain.com/blog导航到博客。这有点奇怪,因为上传的文件总是通过http://www.domain.com/blog/images/file.jpg引用,而不是http://blog.domain.com/images/file.jpg
我如何配置以便所有引用都通过http://blog.domain.com/完成(我不想将asp.net放在我的网站的根)谢谢
我尝试过:
在iis7中配置为应用程序。
您需要添加一个虚拟目录以指向源目录。
制作目录博客 - >主站点中的图像
。然后将images
文件夹设为虚拟,并将其指向 blog.domain的images
文件夹。
I am hosting ASP.NET on asphostportal.com in a sub-directory configured in iis7 as an application. i.e. http://blog.domain.com The user can also navigate to the blog via http://www.domain.com/blog. This is making things a bit odd as files uploaded get referenced always through http://www.domain.com/blog/images/file.jpg as opposed to http://blog.domain.com/images/file.jpg
How can I configure so that all references are done via http://blog.domain.com/ (I do not want to have to put asp.net at the root of my site) thanks
What I have tried:
configured in iis7 as an application.
You need to add a Virtual Directory to point to the source directory.
Make a directoryblog -> images
in the main site. Then make thatimages
folder virtual and point that to the blog.domain'simages
folder.
这篇关于Asp.net 5托管在asphostportal.com上的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!