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?
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.
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 toc:\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
?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 to127.0.0.1
inhosts
file.However this solves my immediate need, still no luck with subdomain urls like this:
http://localhost/mywebsite
.is working on a reply...