Copied to clipboard

Flag this post as spam?

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


  • Andre Roussakoff 13 posts 74 karma points
    Jun 13, 2016 @ 13:11
    Andre Roussakoff
    0

    404 on media folder images when deploying to local IIS in a subfolder of wwwroot

    I am trying to deploy my website locally in a subfolder of the wwwroot folder. What happens is that the media files from ~/media folder are not loaded and I get the 404 error.

    It goes like this: Suppose that my local URL is http://localhost/mywebsite The website is deployed to c:\inetpub\wwwroot\mywebsite.

    When I open the URL, I have no images. In DevTools, I see that the media files are being loaded from http://localhost/media instead of (what I would expect) http://localhost/mywebsite/media. No wonder I get the 404 error.

    If I deploy to the IIS root wwwroot folder, everything works fine. Unfortunately, I cannot deploy any other Umbraco website like this. That is a huge shame and nuisance.

    I have found this Umbraco bug report on Youtrack dating back to October 2014. But it has not been assigned yet. :(

    Some other people have managed to reassign the media path to an external resource by creating a new virtual directory in IIS. I have tried this with my local IIS to no avail.

    Is this a well-known issue and the status quo as of this moment? Does anyone know the workaround how to deploy in a subfolder of wwwroot?

  • Andre Roussakoff 13 posts 74 karma points
    Jun 27, 2016 @ 09:52
    Andre Roussakoff
    0

    I have found a sort of workaround for this. I can deploy my website to a subdirectory as a separate website, like http://mywebsite.local, and then assign this url to 127.0.0.1 in hosts file.

    However this solves my immediate need, still no luck with subdomain urls like this: http://localhost/mywebsite.

Please Sign in or register to post replies

Write your reply to:

Draft