Multiple redirects

Hi guys,

I’ve a domain and I want to

Just to make sure that I’m well understood, here is an example what I’m trying to achieve: =>
.xyz Domain Names | Join Generation XYZ =>
.xyz Domain Names | Join Generation XYZ =>

Even after spending almost an hour on it, still can’t figure it out. It’s working for me in Nginx, but can’t figure it out in Caddy.

Any help is appreciated.

What have you tried already? (Show your Caddyfile)

Ha, got it! First rewrite an exact top domain to something random. Then redirect this exact random to the first domain. Then redirect everything else to the second domain.

Probably terrible solution but it works.

    rewrite / {
        r  (^/$)
        to /asdsa

    redir /asdsa 301


That works! You can also change rewrite / { into rewrite {.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.