Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at

  • Jacob Polden 67 posts 177 karma points
    Jul 24, 2014 @ 11:17
    Jacob Polden

    Umbraco site in an IIS application media items need to point to home directory

    My current project is having a bit of an issue when implementing Umbraco inside an application within an IIS site.

    The site is structured as such:

    MyWebsite/ApplicationDirectory/ -- umbraco homepage

    MyWebsite/ApplicationDirectory/about-us -- umbraco content page

    MyWebsite/ApplicationDirectory/shop -- umbraco shop page


    However on load of the actual site all my resources and links are broken. For static content like css and js it's really to fix: src="~/style.css" (adding the tilde). However my media items are showing the wrong urls.

    Media URLs are coming as /media/etc, which means there full URL on the page as


    rather than


    What I need is a way for media items to go to the home directory vs the root of the site. What is the best way to achieve this?

  • Jacob Polden 67 posts 177 karma points
    Jul 24, 2014 @ 11:50
    Jacob Polden

    I have found a fix, but it's not very elegant.

    <img src="@[email protected]" alt="@image.Name" />

    Is there a more elegant solution?


    This only works on home, d'oh!

Please Sign in or register to post replies

Write your reply to: