Caddy to Traefik configuration

Hi, how would i do something like this in traefik?

(redirectone) {
	@http {
        not header Cookie *refresh=*
        path /ui/*
        not path /ui/account*
	}
	redir @http /ui/account/login?redirect=http://{host}{uri}
}


:80 {
    import redirectone

    handle /hello {
        respond "hello" 200
    }

	handle {
	    respond "not found" 404
	}
}

Could i get any help?