Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    Redirect from one domain to another

    Scheduled Pinned Locked Moved Cache/Proxy
    1 Posts 1 Posters 295 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • S
      sensewolf
      last edited by

      Hi,

      so I have HAProxy set up with the following:

      • three domains
      • http2https redirect
      • shared frontend for various backends
      • SSL termination with certificated based on SNI recognition

      When someone looks for http://service1.example.com they are redirected to https://service1.example.com. The same goes for service2 etc. The backends are also available at service1.anotherexample.com, service2.anotherexample.com, etc. Internally, the backends are contacted via http.

      Now I want to add a setting to redirect one additional domain to one of the existing domains so that when someone wants to connect to service1.another-example.com they are redirected to service1.anotherexample.com etc.

      So it is not sufficient to redirect to "anotherexample.com". I have to keep the "service1" or "service2" part in the redirection. And if there is a path like "/something" at the end, I need to keep that, too.

      What is the best way of doing this?

      Many thanks.

      1 Reply Last reply Reply Quote 0
      • First post
        Last post
      Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.