Copied to clipboard

Flag this post as spam?

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


  • Joel 40 posts 62 karma points
    May 09, 2011 @ 10:51
    Joel
    0

    Domain redirect settings for Umbraco

    Hi all, I got a question:

    I managed to upload a locally developed umbarco to our webhost, but now I got a problem with the links within Umbraco. As we got one webhost with multiple websites and their own domain names (eg. site1, site2 and site3). Each domain is redirecting to a subfolder. For instance http://www.site1.com redirects to ~/site1/. 

    Redirecting works ok; the umbraco site shows perfectly, but the internal linking isn´t. It´s navigation menu (and the login.aspx for the backend) are still referring to http://www.site1.com/site1/news, instead of http://www.site1.com/news.

    Is there a config setting within the Umbraco config files to solve this?

     

     

  • aghy 129 posts 308 karma points
    May 09, 2011 @ 11:55
    aghy
    0

    Hi Joel,

    Have you tried setting the hostname for each sites folder?

    In the content section in umbraco right click on each sites subfolder and go to "Manage hostnames".

    Ben

  • Joel 40 posts 62 karma points
    May 09, 2011 @ 12:37
    Joel
    0

    On the webhost config page I´ve redirected ´www.site1.com´ to the ´/site1´ folder. In the backend I´ve tried to add both ´www.site1.com´ and ´www.site1.com/site1´ to the "Managed hostnames", but none of them made any changes.

    Wanted url: www.site1.com/news

    Url link when clicking on ´News´ in the nav-menu: http://www.site1.com/site1/news/

    Error shown on page:

    Page not found

    No umbraco document matches the url 'http://www.site1.com/site1/site1/news/'

    umbraco tried this to match it using this xpath query'/root/*/* [@urlName = "site1"]/* [@urlName = "news"]')

    This page can be replaced with a custom 404 page by adding the id of the umbraco document to show as 404 page in the /config/umbracoSettings.config file. Just add the id to the '/settings/content/errors/error404' element.

    For more information, visit information about custom 404 on the umbraco website.

    This page is intentionally left ugly ;-)

     

  • aghy 129 posts 308 karma points
    May 09, 2011 @ 13:12
    aghy
    0

    On your webhost you should have all the domains pointing to your umbraco installation. Then set up the hostnames in umbraco.

    Ben

  • Joel 40 posts 62 karma points
    May 09, 2011 @ 13:48
    Joel
    0

    Currently only one (site1) website is using umbraco. The umbraco installation is therefor also in the ~/site1 folder.

    I´ve added "www.site1.com" and "site1.com" in the Managed hostnames of Umbraco. Using the webportal to configure my webhost, I´ve redirected "www.site1.com" and "site1.com" to the ~/site1 folder.

    Is there another way to let Umbraco determine it´s root folder?

     

     

  • aghy 129 posts 308 karma points
    May 09, 2011 @ 14:01
    aghy
    0

    Sorry! I see now, I thought you wanted to have all three domains in a single instance of umbraco.

    If you are having there separate instances of umbraco you do not need to use the manage hostnames.

    So you have umbraco installed in ~/site1/ and you have www.site1.com redirecting to that folder. In the content section Republish entire site.

    How do you have your site structured in the content section?

    I usually set it up so I have all my pages like about us, contact us etc. inside my home page ie:

    Content
    -> Home
        ->About us
        ->Page 1
        ->Contact Us
    ->Recycle Bin

    Hope this makes sense.

    Ben

     

  • Joel 40 posts 62 karma points
    May 09, 2011 @ 14:23
    Joel
    0

    Np, Ben. I´m already glad with the help your giving to solve this issue :)

    However, still no improvements.

    I´m using the same page structure as posted above.

    Small side-problem I got is that I can´t get into the backend when I redirected the domain. As the site tries to include an additional ´/site1´ tag in the URL I´m getting a viewstate error when trying to login. When I´m not redirecting the domain, I can login perfectly. So I had to Republish the enitre site before implementing the redirect. I don´t know if this gives any issues?

     

     

  • aghy 129 posts 308 karma points
    May 09, 2011 @ 14:37
    aghy
    0

    When I say redirecting I should really be saying pointing to. So www.site1.com should be pointing to the folder /site1 wherever that is on your webhost. So if you've set up folders for each site you need to point the domain for each to their own folders where umbraco has been installed.

    What is the url you are using to get into umbraco is it www.site1.com/umbraco/umbraco.aspx?

    I have a feeling that you had it all set up correctly in the first place and I just misunderstood what you were trying to do. I think you just needed to set umbracoHideTopLevelNodeFromPath to true in your web.config I think it's false by default.

    <add key="umbracoHideTopLevelNodeFromPath" value="true" />

    Ben

  • Joel 40 posts 62 karma points
    May 09, 2011 @ 15:14
    Joel
    0

    I need to use www.site1.com/site1/umbraco/umbraco.aspx   and need to disable the domain redirection.

    When the domain is redirected I can´t login in the backend due to the URL mismatch.   www.site1.com/umbraco/umbraco.aspx refers to http://www.easyp.nl/easyp/umbraco/login.aspx which offcourse gives an viewstate error due to a different URL

    The ´umbracoHideTopLevelNodeFromPath´ was already set correctly in my web.config.  When turning it off it gives:  www.site1.com/home/...  instead of www.site1.com/..

  • aghy 129 posts 308 karma points
    May 09, 2011 @ 16:33
    aghy
    0

    Hmmm,

    What sort of control do you have of IIS?
    Can you set the home directory for a domain?
    Can you set the host headers of a domain?

    Here's what I would do on a typical umbraco install:

    3 different domains pointing to the same ip, done in the dns for each domain, www.site1.com and site1.com
    On the server I would give each website their own home folder each with an instance of umbraco.
    Then in IIS I would add a new website, set the home directory, and add host headers for www.site1.com and site1.com in IIS not umbraco.

    Ben

  • Joel 40 posts 62 karma points
    May 09, 2011 @ 16:51
    Joel
    0

    Unfortunatly I got no control over the IIS server. 

    I can only redirect the domain to a specific folder.

    I did found a httpd.ini in the root folder of my ´webhost area´. I believe its the config file for IIS for the domain redirection:

    [ISAPI_Rewrite]

    /site1$1 [I,L]

    RewriteCond %SERVER_NAME ^site1\.com$

    RewriteRule (.*)         

    /site1$1 [I,L]

    RewriteCond %SERVER_NAME ^www\.site1\.com$

    RewriteRule (.*) 

     

    I´ll gonna try a fresh umbraco install in a new folder (instead of copying the files from a local develop station via ftp), maybe it will solve this problem. 

     

  • Joel 40 posts 62 karma points
    May 10, 2011 @ 10:39
    Joel
    0

    Somebody else got an idea why Umbraco isn´t referring to the correct url?

    I´ve redirected the domain to a subfolder, but Umbraco isn´t being redirected  and continous to add the folder (which is now the domain´s root )to the url :$

     

Please Sign in or register to post replies

Write your reply to:

Draft