Redirecting HTTPS to HTTPS

Hello!

Does HAProxy have any ways to make redirect for HTTPS traffic to HTTPS?

Elaborate please.

such construction does not work

redirect prefix <site-to> code 301 if { req.ssl_sni -i <site-from> }