简体   繁体   中英

Broken link after deploying asp.net web application IIS7

I have my web_app that i want to deploy under the existing domain.it/

The problem is that all urls in the web_app are absolute, so all the links are broken.

How i can say, is it possible, for iis to change the root level of the web_app? I can't deploy web_app folder under root.

Thanks!!

If you use path in such a way, then you don't need to care where your application will be deployed. look below some example....

<img alt="" runat="server" src="~/Images/abc.jpg" />
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/About.aspx">HyperLink</asp:HyperLink>

~ Will map to Application Root Directory

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM