Copied to clipboard

Flag this post as spam?

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


  • J 445 posts 862 karma points
    Sep 14, 2017 @ 15:21
    J
    0

    I have one umbraco with multiple sites. Each site has its own culture/host name set individually within umbraco.

    So i have

    www.WebsiteOne.com under site 1

    www.WebSiteTwo.com under site 2

    etc

    Is it possible when someone types in WebsiteOne.com it redirects to www.websiteone.com and when they type websiteTwo.com it redirects to www.websitetwo.com? (not case sensitive, just a habit)

  • Craig Mayers 164 posts 508 karma points
    Sep 14, 2017 @ 16:45
    Craig Mayers
    100

    Hi J,

    This can be configured via IIS (itself) OR you can do it by editing the web.config directly.

    See the following blog post on Scott Forsyth's blog (quite old now, but should do the job for you).

    IIS URL Rewrite – rewriting non-www to www

    Let me know how you get on.

    Craig

  • Lewis Smith 208 posts 617 karma points c-trib
    Sep 15, 2017 @ 08:44
    Lewis Smith
    1

    Hi,

    You could redirect them at the top of your template (master if youre using one)

    The following code should work, although doing this through IIS as Craig suggested would work better.

    @inherits UmbracoViewPage<IPublishedContent>
    @{ 
         Response.Redirect("http://www.the-link-you-want-to-redirect-to.com");
    }
    

    This will just redirect to the page you provide everytime the template is loaded.

    Thanks, Lewis

Please Sign in or register to post replies

Write your reply to:

Draft