Copied to clipboard

Flag this post as spam?

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


  • LearningUmbraco 8 posts 78 karma points
    May 31, 2016 @ 20:50
    LearningUmbraco
    0

    Relative paths in Virtual Directory

    I am using Umbraco 7. I built the site in Umbraco and created virtual directory for it in IIS. After doing that, none of my paths are working for JS, CSS, images or media files. Before putting it in IIS I had the relative paths as "../Images/test.jpg", but now after moving to IIS, I need to change paths on every place to "../VirtualDirectoryName/Images/test.jpg" to make it working.

    Is there a way to solve this issue without changing every single link.

    Please help!

    Thanks, SJ

  • Mac McDell 73 posts 148 karma points
    May 31, 2016 @ 21:11
    Mac McDell
    0

    SJ have you tried instead of using virtual directory adding an application? Is your new umbraco within the shell of the other site? Before you go changing everything.. I would look at the application option instead.

  • LearningUmbraco 8 posts 78 karma points
    May 31, 2016 @ 22:16
    LearningUmbraco
    0

    Hello Mac,

    Thanks for your reply. I tried adding it as Application but still no luck. Umbraco is not in another shell either. Any other suggestions?

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    May 31, 2016 @ 21:17
    Paul Seal
    0

    Hi Try changing your paths to start with a forward slash like this

    src="/images/name.jpg"

    That's what works on mine.

  • LearningUmbraco 8 posts 78 karma points
    May 31, 2016 @ 22:17
    LearningUmbraco
    0

    Thanks Paul for your reply. No, its not working for me. I tried it while adding the website as application in IIS too.

  • Paul Seal 524 posts 2889 karma points MVP 6x c-trib
    May 31, 2016 @ 22:45
    Paul Seal
    0

    It may be a long shot but check you have read/write permissions set on the windows folder of your web project for IIS_USRS and IUSR.

  • Mac McDell 73 posts 148 karma points
    Jun 01, 2016 @ 16:35
    Mac McDell
    0

    SJ from what I understand you have umbraco running as its own website. You have another website running that you want to roll umbraco into. Have you considered just reverse proxying (s/p) the umbraco site into your other one? Its a pretty simple method once you have installed Application Request Routing in IIS. Take a look at this article. http://www.iis.net/learn/extensions/url-rewrite-module/reverse-proxy-with-url-rewrite-v2-and-application-request-routing

    We are using it with a very high degree of success.

Please Sign in or register to post replies

Write your reply to:

Draft