# port redirection without using irule

**URL:** <https://community.f5.com/t/port-redirection-without-using-irule/57111>\
**Category:** Technical Forums\
**Tags:** availability, iapps, deployment, big-ip-access-policy-manager-apm, security, devops, cloud\
**Created:** [September 10, 2015, 5:59am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111 "2015-09-10T05:59:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![alteon\_98264](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@alteon\_98264](https://community.f5.com/u/alteon_98264)\
**Post date:** [September 10, 2015, 5:59am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111/1 "2015-09-10T05:59:52Z")

</div>

Hi,

when application users targets old infra pointing to x.x.y.y:6009 and we need them to be redirected to z.z.x.y:10108 without using iRULE.

is there a way to do it?

Please advise.

---

<div class="post-metadata">

**Author:** ![stan\_piron](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@stan\_piron](https://community.f5.com/u/stan_piron)\
**Post date:** [September 10, 2015, 8:00am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111/2 "2015-09-10T08:00:19Z")

</div>

Hi,

why without using irule???

you can do it with with Local traffic policies (since version 11.4) or HTTP Class (up to version 11.3)

Stanislas

---

<div class="post-metadata">

**Author:** ![alteon\_98264](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@alteon\_98264](https://community.f5.com/u/alteon_98264)\
**Post date:** [September 14, 2015, 12:31am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111/3 "2015-09-14T00:31:12Z")

</div>

can you please provide an example?

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![alteon\_98264](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@alteon\_98264](https://community.f5.com/u/alteon_98264)\
**Post date:** [September 14, 2015, 12:31am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111/4 "2015-09-14T00:31:21Z")

</div>

can you please provide an example?

what we require is that everything in the URL remains same except the port

Thanks in advance.

---

<div class="post-metadata">

**Author:** ![stan\_piron](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@stan\_piron](https://community.f5.com/u/stan_piron)\
**Post date:** [September 14, 2015, 9:41am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111/5 "2015-09-14T09:41:02Z")

</div>

Hi,

1. can you please answer my question: why without using irule?
2. I proposed 2 solutions based on version… which version is installed?
3. can you explain what you mean by “redirect”? do you mean HTTP redirect or pool member with port different than virtual server?
4. Alteon is not the best nickname on a F5 forum 🙂

---

<div class="post-metadata">

**Author:** ![alteon\_98264](https://avatars.discourse-cdn.com/v4/letter/a/53a042/32.png) [@alteon\_98264](https://community.f5.com/u/alteon_98264)\
**Post date:** [September 15, 2015, 12:58am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111/6 "2015-09-15T00:58:25Z")

</div>

Hi Stanislas,

version details Product BIG-IP VE Version 11.3.0

so the requirement is x.x.y.y:6009/abc/def/login.aspx and we need them to be redirected to z.z.x.y:10108//abc/def/login.aspx.

so there is existing vip with pool members (a.b.c.d:10108 and e.f.g.h.i:10108)

need to get syntax across using TCL or regex to achieve this..

---

<div class="post-metadata">

**Author:** ![stan\_piron](https://avatars.discourse-cdn.com/v4/letter/s/7bcc69/32.png) [@stan\_piron](https://community.f5.com/u/stan_piron)\
**Post date:** [September 15, 2015, 6:43am UTC](https://community.f5.com/t/port-redirection-without-using-irule/57111/7 "2015-09-15T06:43:49Z")

</div>

Hi alteon,

you can create a HTTP Class (Profile / Protocol / HTTP Class) with:

- condition : http host equals app.mycompany.com:6009
- action : redirect
  - redirect URL : [http://app2.mycompany.com:10108](http://app2.mycompany.com:10108)[HTTP::uri]
