# need irule

**URL:** <https://community.f5.com/t/need-irule/1896>\
**Category:** Technical Forums\
**Tags:** dev, irules, devops, application-delivery\
**Created:** [July 30, 2010, 5:33pm UTC](https://community.f5.com/t/need-irule/1896 "2010-07-30T17:33:23Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Arulkumar\_10681](https://avatars.discourse-cdn.com/v4/letter/a/d6d6ee/32.png) [@Arulkumar\_10681](https://community.f5.com/u/Arulkumar_10681)\
**Post date:** [July 30, 2010, 5:33pm UTC](https://community.f5.com/t/need-irule/1896/1 "2010-07-30T17:33:23Z")

</div>

Hi,

Can anyone help me in writing irule so that i can redirect as below

“[http://training.time.com:6000](http://training.time.com:6000)” redirected to [http://marketing.time.com:7777/ebs11i.html](http://marketing.time.com:7777/ebs11i.html)

Thank you in advance

Regards

Arulkumar

---

<div class="post-metadata">

**Author:** ![The\_Bhattman](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/the_bhattman/32/13958_2.png) [@The\_Bhattman](https://community.f5.com/u/The_Bhattman)\
**Post date:** [July 31, 2010, 8:04pm UTC](https://community.f5.com/t/need-irule/1896/2 "2010-07-31T20:04:22Z")

</div>

Hi Arulkumar,

Assuming that the website ONLY responds on port 6000 then you can write something as simpleas the following

```tcl
when HTTP_REQUEST {
   if { ([HTTP::host] eq "training.time.com") and ([HTTP::uri] eq "/") } {
        HTTP::redirect "http://marketing.time.com:7777/ebs11i.html"
      }
}

```

I hope this helps

Bhattman

---

<div class="post-metadata">

**Author:** ![The\_Bhattman](https://d1p9zq3aats0t8.cloudfront.net/user_avatar/community.f5.com/the_bhattman/32/13958_2.png) [@The\_Bhattman](https://community.f5.com/u/The_Bhattman)\
**Post date:** [July 31, 2010, 8:07pm UTC](https://community.f5.com/t/need-irule/1896/3 "2010-07-31T20:07:39Z")

</div>

Also if your running version 10 you should look into http class ([http://devcentral.f5.com/Default.aspx?tabid=37&cx=015798286719081439686:g38hs-tdy64&cof=FORID:11&q=http%20class1181](http://devcentral.f5.com/Default.aspx?tabid=37&cx=015798286719081439686:g38hs-tdy64&cof=FORID:11&q=http%20class1181))

Bhattman
