Copied to clipboard

Flag this post as spam?

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


  • Søren H. Pedersen 15 posts 65 karma points
    Nov 19, 2014 @ 11:19
    Søren H. Pedersen
    0

    Localhost Added to path

    Hello there

    I've recently finished a new site in umbraco but there are some problems. When working on it locally, the path just reads "/pagename/". But when I upload the site, this is added to the path: "http://localhost:62384/" and the link then ofcourse doesn't work.

    I have another site which is basicly identical to this new site, and it works fine. So I am not sure where the problem occurs and therefore, not sure what snippets of code would help locate it.

    But the links are located in a partialview and looks like this:

    <a class="btn btn-1" href="@item.Url" >@item.Name</a>
    

    But I hope to find some help to this, because I am really puzzled as to why a almost identical site wouldn't work. Also, if this is the wrong place to ask, I im sorry and please direct me to the correct spot on the forum.

    Kind Regards Søren

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 19, 2014 @ 11:22
    Jan Skovgaard
    0

    Hi Søren

    Have you set up at hostname for the root node of your site?

    And is the database shared between your local dev environment and the stage/production environement? Then you need to setup an IIS site on the server and add a serverhostname as well.

    But tell us a bit more details about your setup then it will be easier to figure out what you need to do.

    /Jan

  • Søren H. Pedersen 15 posts 65 karma points
    Nov 19, 2014 @ 18:21
    Søren H. Pedersen
    0

    Hello Jan and thanks for the reply

    Its always easier with more details. But Im not sure what details would help the most. But

    I do not believe I have setup a hostname for the root for this site, or the working one. I simply ran through the Umbraco setup and started creating documentypes, css's, templates, ect..

    And I do not believe that the database is shared either. Again, I do not recal setting these up on either site.

    • Homepage
      • txtPage
      • txtPage
        • txtSubpage
      • txtPage

    So the setup is a basic menu. But as said, when I upload to the host, the path to the aspx pages in the href is changed.

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 19, 2014 @ 22:25
    Jan Skovgaard
    0

    Hi Søren

    Ok, so you're probably using the embedded CE SQL database, which is being used as default unless you change it during installation.

    You probably need to setup an IIS website both locally and on your server where you point to your website and add the hostnames where they should be used (mysite.local) for the local site and (mysite.testsite.com) for instance.

    Then you'll need to republish the entire site and then it should work so the url on the server is correct.

    Hope this makes sense.

    /Jan

  • Søren H. Pedersen 15 posts 65 karma points
    Nov 20, 2014 @ 11:53
    Søren H. Pedersen
    0

    Hello again Jan

    It makes some sense. But I decided to try and directly copying the working site to the host, and it works (which was excpected). So since they are very similar, I want to try and simply copy the css, templates, ect.. From the old site over to the old working site. I think it should work :P

    Kind Regards Søren

  • Jan Skovgaard 11280 posts 23678 karma points MVP 10x admin c-trib
    Nov 20, 2014 @ 11:56
    Jan Skovgaard
    0

    Hi Søren

    Well that's also an option indeed :)

    And if you're going to use the server for production and not staging then it's fine for sure. Just be aware that it might be a good idea to run a database server for the production site rather than CE SQL.

    Happy umbracoing.

    /Jan

Please Sign in or register to post replies

Write your reply to:

Draft