# Redirection on ssl/tls exception?

**URL:** <https://discourse.mitmproxy.org/t/redirection-on-ssl-tls-exception/954>\
**Category:** help\
**Created:** [April 3, 2018, 7:54am UTC](https://discourse.mitmproxy.org/t/redirection-on-ssl-tls-exception/954 "2018-04-03T07:54:40Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![initial.z](https://avatars.discourse-cdn.com/v4/letter/i/5f8ce5/32.png) [@initial.z](https://discourse.mitmproxy.org/u/initial.z)\
**Post date:** [April 3, 2018, 7:54am UTC](https://discourse.mitmproxy.org/t/redirection-on-ssl-tls-exception/954/1 "2018-04-03T07:54:41Z")

</div>

Hi all,

I’m trying to make redirection whenever an ssl/tls exception is occur (eq. ssl handshake failed or unknown ca) then it redirect to any host or landing page.

I see [this script](https://github.com/mitmproxy/mitmproxy/blob/master/examples/simple/redirect_requests.py) and [that script](https://github.com/mitmproxy/mitmproxy/blob/master/examples/complex/tls_passthrough.py) but I’ve no idea how to combine these two scripts 😭 . Or may be any other script that can answer my problem?

Highly appreciation if any body give me the solution.

Thank you,

-z-

---

<div class="post-metadata">

**Author:** ![mhils](https://yyz2.discourse-cdn.com/flex030/user_avatar/discourse.mitmproxy.org/mhils/32/7_2.png) [@mhils](https://discourse.mitmproxy.org/u/mhils)\
**Post date:** [April 5, 2018, 11:53am UTC](https://discourse.mitmproxy.org/t/redirection-on-ssl-tls-exception/954/2 "2018-04-05T11:53:07Z")

</div>

That’s not really possible - if we try to intercept and that fails, the browser will (rightfully) always serve a security warning.
