# irule: redirect to different paths with same host.

**URL:** <https://community.f5.com/t/irule-redirect-to-different-paths-with-same-host/49515>\
**Category:** Technical Forums\
**Tags:** big-ip, irules, application-delivery\
**Created:** [July 22, 2021, 5:27pm UTC](https://community.f5.com/t/irule-redirect-to-different-paths-with-same-host/49515 "2021-07-22T17:27:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![franktruong3](https://avatars.discourse-cdn.com/v4/letter/f/3ec8ea/32.png) [@franktruong3](https://community.f5.com/u/franktruong3)\
**Post date:** [July 22, 2021, 5:27pm UTC](https://community.f5.com/t/irule-redirect-to-different-paths-with-same-host/49515/1 "2021-07-22T17:27:07Z")

</div>

Hi,

I’m new at F5 and iRule.

I try to redirect from root location to different path on the same node.

[https://abc.domain.com](https://abc.domain.com) → [https://abc.domain.com/path](https://abc.domain.com/path)

What is wrong with this rule?

=================iRule===================================================

when HTTP\_REQUEST {

if { ([string tolower [HTTP::host]] eq “[abc.domain.com](http://abc.domain.com)”) } {

HTTP::redirect “[https://](https://access.primelending.com/identityiq)[abc.domain.com/path](http://abc.domain.com/path)”

}

}

=========================================================================

---

<div class="post-metadata">

**Author:** ![spalande](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/spalande/32/10043_2.png) [@spalande](https://community.f5.com/u/spalande)\
**Post date:** [July 22, 2021, 6:46pm UTC](https://community.f5.com/t/irule-redirect-to-different-paths-with-same-host/49515/2 "2021-07-22T18:46:49Z")

</div>

```tcl
if { ([string tolower [HTTP::host]] eq "abc.domain.com") and ([HTTP::uri] eq "/")} {

```

---

<div class="post-metadata">

**Author:** ![franktruong3](https://avatars.discourse-cdn.com/v4/letter/f/3ec8ea/32.png) [@franktruong3](https://community.f5.com/u/franktruong3)\
**Post date:** [July 22, 2021, 8:14pm UTC](https://community.f5.com/t/irule-redirect-to-different-paths-with-same-host/49515/3 "2021-07-22T20:14:53Z")

</div>

It works….Thanks SanjayP!!!
