I just uploaded my umbraco website to my server in a subfolder. Because I want to test it first before making it live. The website is showing the contents but its not able to locate all the files related to the layout, which means no css or media files. How can I change the path in webconfig to search for those files in my subfolder?
Just created a subfolder in wwwroot folder and upload the contents to that folder. Also created the virtual directory in the server. So to access my website I'm doing something like www.mywebsite.com/test. What is happening is that it cant load the css and other files because its looking for them in in www.mywebsite.com. I got the error: "Failed to load resource", and the website only loads the contens from the database, because I'm using SQL Express, and no able to load all the css and js files and so on.
I think I need to update the path, but just don't know where to do it.
which version of Umbraco are you using? Is the site going to live in a virtual directory on live too? If not I would suggest setting it up as a site itself so that you have a real test scenario.
As for the js and css files you need to open your Layout.cshtml file and update the path like below so that it can resolve the urls.
I think it's more complicated than that, becaise I'm also not able to load the images on my media folder. Because it tries to fetch the files on the main website, and not on the subfolder that I created. I just need to find a way to change the path.
I am currently doing a very similar piece of work, hosting Umbraco inside another site as an application. I only had to update the js and css path, didnt have to update the media path.
Did u update the media path as said in the link above? Also did you copy the files off from another server or from your local. Usually we dont add media folder to VS solution and for the same reason it will not publish which means that you will not have the media files.
Setup test website on server
Hi guys,
I just uploaded my umbraco website to my server in a subfolder. Because I want to test it first before making it live. The website is showing the contents but its not able to locate all the files related to the layout, which means no css or media files. How can I change the path in webconfig to search for those files in my subfolder?
Thank you very much
Hi,
How did you publish your website?
Poornima
Hi,
Just created a subfolder in wwwroot folder and upload the contents to that folder. Also created the virtual directory in the server. So to access my website I'm doing something like www.mywebsite.com/test. What is happening is that it cant load the css and other files because its looking for them in in www.mywebsite.com. I got the error: "Failed to load resource", and the website only loads the contens from the database, because I'm using SQL Express, and no able to load all the css and js files and so on.
I think I need to update the path, but just don't know where to do it.
Thank you!
which version of Umbraco are you using? Is the site going to live in a virtual directory on live too? If not I would suggest setting it up as a site itself so that you have a real test scenario.
As for the js and css files you need to open your Layout.cshtml file and update the path like below so that it can resolve the urls.
Let me know if it helps.
Poornima
I think it's more complicated than that, becaise I'm also not able to load the images on my media folder. Because it tries to fetch the files on the main website, and not on the subfolder that I created. I just need to find a way to change the path.
Have you tried what is said here?
https://guozspace.com/2016/02/26/move-umbraco-7-x-from-root-website-to-virtual-directory/
I am currently doing a very similar piece of work, hosting Umbraco inside another site as an application. I only had to update the js and css path, didnt have to update the media path.
Poornima
But for me the media is not working. Even when I open the umbraco backoffice I'm not able to see the images and such on the media folder.
Did u update the media path as said in the link above? Also did you copy the files off from another server or from your local. Usually we dont add media folder to VS solution and for the same reason it will not publish which means that you will not have the media files.
Poornima
is working on a reply...