Copied to clipboard

Flag this post as spam?

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


  • Gabor Ferencz 40 posts 181 karma points
    Nov 02, 2022 @ 15:05
    Gabor Ferencz
    0

    Redirect on Multisite Headless Umbraco 8 Build

    We have implemented a headless site that serves up content to a multi-site, multi-culture website in Umbraco 8. The front-end is Vue.js, with nuxt.js.

    The way we made it work is by implementing custom Content Finders that look for a custom HTTP header from the FE called frontend-host that contains the domain of the site we're requesting from the api. the api would run on a single domain called api.site.com

    This all works well for the routing, but when it comes to Umbraco's redirect tracker, it falls over, because the Request Host is api.site.com/page and not site1.com/page, and the redirect is for site1.com/page to site1.com/page1

    What can I do here? How can I tap into the Redirect handler in Umbraco, and potentially replace it?

  • Gabor Ferencz 40 posts 181 karma points
    Nov 04, 2022 @ 11:58
    Gabor Ferencz
    101

    For those looking, I fixed this by creating a new ContentFinderByRedirectUrl and replaced the default with a new one that determines domain based on the current frontend-host request header.

    I copied the code from the source code. Hackety hack.

  • Brendan Rice 538 posts 1102 karma points
    May 04, 2023 @ 14:08
    Brendan Rice
    0

    Hi Gabor,

    have you got any articles or resources that would help get started with Umbraco & Nuxt?

Please Sign in or register to post replies

Write your reply to:

Draft