Copied to clipboard

Flag this post as spam?

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


  • Nelson 94 posts 246 karma points
    Jul 08, 2016 @ 07:08
    Nelson
    0

    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

  • Poornima Nayar 90 posts 208 karma points MVP c-trib
    Jul 08, 2016 @ 07:20
    Poornima Nayar
    0

    Hi,

    How did you publish your website?

    Poornima

  • Nelson 94 posts 246 karma points
    Jul 08, 2016 @ 07:24
    Nelson
    0

    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!

  • Poornima Nayar 90 posts 208 karma points MVP c-trib
    Jul 08, 2016 @ 08:16
    Poornima Nayar
    0

    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.

    <link href="~/css/style.css" rel="stylesheet" type="text/css">
    
    
    
     <script type="text/javascript" src="~/scripts/site.js"></script>
    

    Let me know if it helps.

    Poornima

  • Nelson 94 posts 246 karma points
    Jul 08, 2016 @ 08:24
    Nelson
    0

    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.

  • Poornima Nayar 90 posts 208 karma points MVP c-trib
    Jul 08, 2016 @ 08:27
    Poornima Nayar
    0

    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

  • Nelson 94 posts 246 karma points
    Jul 08, 2016 @ 08:36
    Nelson
    0

    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.

  • Poornima Nayar 90 posts 208 karma points MVP c-trib
    Jul 08, 2016 @ 08:40
    Poornima Nayar
    0

    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

Please Sign in or register to post replies

Write your reply to:

Draft