Base solution for your next web application
Open Closed

Resolve Tenant or host based on URL settings #12286


User avatar
0
mmukkara created

Version: Angular (13.4)

We would like to route to different landing pages based on the URL (before user login). Currently we have 2 tenant and a host. Application instance is same for all. HOSTdomain.com - should resolve tenant id = null and based on that we can route it to host landing page TENANT1.com - should resolve tenant id = 2 based on domain name and that will be routed to tenant landing page provider.TENANT2.com - should resolve tenant id = 3 based on domain name and that will be routed to tenant landing page

How can we set up appBaseUrl in the angular front end to define multiple urls like above.

Please note: User is not logged in and we need to do different branding for each tenant landing page.

Appreciate for your quick reply with sample.

Thank you!


3 Answer(s)
  • User Avatar
    0
    m.aliozkaya created
    Support Team

    Hi @mmukkara,

    Could you check this documents? https://aspnetboilerplate.com/Pages/Documents/Multi-Tenancy#determining-current-tenant https://docs.aspnetzero.com/aspnet-core-angular/latest/Infrastructure-Angular-Tenancy-Resolvers

  • User Avatar
    0
    mmukkara created

    Thank you for the help. We reviewed the documentation but it does say how it works but doesn't say how to setup the client and server. Do you have any example projects? Can angular app settings appBaseURL takes multiple domain names? How to set it up both ?

  • User Avatar
    0
    oguzhanagir created
    Support Team

    Hi @mmukkara

    Have you examined this document? It creates the same situation as you stated with the approach here. You can redirect to relevant domains according to the tenancy name.