# Redirect HTTPS URL

**URL:** <https://community.f5.com/t/redirect-https-url/1252>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [July 11, 2013, 1:30pm UTC](https://community.f5.com/t/redirect-https-url/1252 "2013-07-11T13:30:32Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![fcocquyt\_104704](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fcocquyt\_104704](https://community.f5.com/u/fcocquyt_104704)\
**Post date:** [July 11, 2013, 1:30pm UTC](https://community.f5.com/t/redirect-https-url/1252/1 "2013-07-11T13:30:32Z")

</div>

Hello,

Is is possible to redirect an HTTP URL to another HTTPS url on F5 ?

Example, [https://www.test1.com](https://www.test1.com) gets redirected to [https://www.test2.com](https://www.test2.com)

As far I see, this is only possible for regular http traffic ?

Thanks,

Frederik

---

<div class="post-metadata">

**Author:** ![nitass](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nitass/32/2270_2.png) [@nitass](https://community.f5.com/u/nitass)\
**Post date:** [July 11, 2013, 1:33pm UTC](https://community.f5.com/t/redirect-https-url/1252/2 "2013-07-11T13:33:56Z")

</div>

Example, [https://www.test1.com](https://www.test1.com) gets redirected to [https://www.test2.comdoesn](https://www.test2.comdoesn)’t HTTP::redirect work?

e.g.

HTTP::redirect “[https://www.test2.com](https://www.test2.com)”

---

<div class="post-metadata">

**Author:** ![fcocquyt\_104704](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fcocquyt\_104704](https://community.f5.com/u/fcocquyt_104704)\
**Post date:** [July 11, 2013, 1:56pm UTC](https://community.f5.com/t/redirect-https-url/1252/3 "2013-07-11T13:56:01Z")

</div>

Hi,

The redirect would be for an HTTPS URL to another HTTPS url (typo in my first description)

It is not possible to apply an irule for a virtual server listening on port 443 as the F5 complains that it needs an HTTP profile when applying the iRule containing HTTP::redirect "[https://www.test2.com](https://www.test2.com).

Thanks,

Frederik

---

<div class="post-metadata">

**Author:** ![nitass](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/nitass/32/2270_2.png) [@nitass](https://community.f5.com/u/nitass)\
**Post date:** [July 11, 2013, 2:01pm UTC](https://community.f5.com/t/redirect-https-url/1252/4 "2013-07-11T14:01:14Z")

</div>

e.g.

```tcl
[root@ve10:Active] config b virtual bar443 list
virtual bar443 {
   destination 172.28.19.252:443
   ip protocol 6
   rules myrule
   profiles {
      clientssl {
         clientside
      }
      http {}
      tcp {}
   }
}
[root@ve10:Active] config b rule myrule list
rule myrule {
   when HTTP_REQUEST {
  if { [HTTP::host] eq "www.test1.com" and [HTTP::uri] eq "/" } {
    HTTP::redirect "https://www.test2.com"
  }
}
}

[root@ve10:Active] config curl -Ik https://www.test1.com
HTTP/1.0 302 Found
Location: https://www.test2.com
Server: BigIP
Connection: Keep-Alive
Content-Length: 0

```

---

<div class="post-metadata">

**Author:** ![Kevin\_Stewart](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/kevin_stewart/32/15267_2.png) [@Kevin\_Stewart](https://community.f5.com/u/Kevin_Stewart)\
**Post date:** [July 11, 2013, 2:23pm UTC](https://community.f5.com/t/redirect-https-url/1252/5 "2013-07-11T14:23:55Z")

</div>

Nitass is showing you that in order to process HTTP (OSI layer 7) application traffic, you must be able to **see** it. You cannot see the traffic if you cannot decrypt it, so a client SSL profile applied to the VIP will allow you to terminate the SSL and see and react to the payload.

---

<div class="post-metadata">

**Author:** ![fcocquyt\_104704](https://avatars.discourse-cdn.com/v4/letter/f/ba9def/32.png) [@fcocquyt\_104704](https://community.f5.com/u/fcocquyt_104704)\
**Post date:** [July 11, 2013, 2:33pm UTC](https://community.f5.com/t/redirect-https-url/1252/6 "2013-07-11T14:33:45Z")

</div>

Thanks nitass !

Is seems I needed to apply the

profiles {

clientssl {

clientside

}

http {}

part to make this work.

Have a nice day !

Frederik.
