# http-to-https redirection secnario?

**URL:** <https://community.f5.com/t/http-to-https-redirection-secnario/7237>\
**Category:** Technical Forums\
**Tags:** big-ip-dns, design, management, deployment, ltm, application-delivery\
**Created:** [June 10, 2014, 7:47am UTC](https://community.f5.com/t/http-to-https-redirection-secnario/7237 "2014-06-10T07:47:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mahmoud\_Eldeeb](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Mahmoud\_Eldeeb](https://community.f5.com/u/Mahmoud_Eldeeb)\
**Post date:** [June 10, 2014, 7:47am UTC](https://community.f5.com/t/http-to-https-redirection-secnario/7237/1 "2014-06-10T07:47:36Z")

</div>

for a network with LTM & LC, where to put the http-to-https redirection? and what is the best practice for this setup

---

<div class="post-metadata">

**Author:** ![Cory\_50405](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@Cory\_50405](https://community.f5.com/u/Cory_50405)\
**Post date:** [June 10, 2014, 11:58am UTC](https://community.f5.com/t/http-to-https-redirection-secnario/7237/2 "2014-06-10T11:58:28Z")

</div>

The redirection is probably best done at the LTM level. There’s a built-in iRule called \_sys\_https\_redirect that you can apply to a port 80 virtual server to redirect the request to 443.

---

<div class="post-metadata">

**Author:** ![Mahmoud\_Eldeeb](https://avatars.discourse-cdn.com/v4/letter/m/df788c/32.png) [@Mahmoud\_Eldeeb](https://community.f5.com/u/Mahmoud_Eldeeb)\
**Post date:** [June 11, 2014, 11:07am UTC](https://community.f5.com/t/http-to-https-redirection-secnario/7237/3 "2014-06-11T11:07:17Z")

</div>

In this case I have to have both 80 & 443 are configured in LC for the same VS in order to pass the traffic. am I right?

---

<div class="post-metadata">

**Author:** ![Cory\_50405](https://avatars.discourse-cdn.com/v4/letter/c/f19dbf/32.png) [@Cory\_50405](https://community.f5.com/u/Cory_50405)\
**Post date:** [June 11, 2014, 11:39am UTC](https://community.f5.com/t/http-to-https-redirection-secnario/7237/4 "2014-06-11T11:39:51Z")

</div>

You would need virtual servers configured for both 80 and 443, and you’d apply the \_sys\_https\_redirect iRule to only your port 80 virtual server.
