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:
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.
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.
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.
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.
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
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.
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:
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
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
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.
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.
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
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
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
is working on a reply...