Copied to clipboard

Flag this post as spam?

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

  • Oskar 5 posts 75 karma points
    Nov 06, 2019 @ 19:55

    Multi Sites - Umbraco 8 - Logging


    I am working with Umbraco v8 (recently I've started) and in my project I have 2 sites set up as example:

    I want to log the domain or url to indicate in that site I was.

    Is there any key to know that? Is configurable? Please, someone can give me some idea... how to implement that.

  • Dana Halter 8 posts 88 karma points
    Nov 07, 2019 @ 13:49
    Dana Halter

    I'm using 7.15.1 and have multiple sites. When I want to render a site locally I edit the Culture and Hostnames of the top level site node to include "localhost/site1" then move to the next site and do the same thing with the second url.

    Make sure you name the localhost url the same as your node.

    In your example your site node should say 'site1'

  • Oskar 5 posts 75 karma points
    Nov 18, 2019 @ 20:20

    Hi Dana, thanks for your answer, that is, configure them in the backoffice, right?

    I was researching and I got "\site1", using this line "UmbracoContext.PublishedRequest.Domain.Name" in my code.

Please Sign in or register to post replies

Write your reply to: