# convert http class to irule

**URL:** <https://community.f5.com/t/convert-http-class-to-irule/26972>\
**Category:** Technical Forums\
**Tags:** irules, devops\
**Created:** [March 16, 2017, 2:41pm UTC](https://community.f5.com/t/convert-http-class-to-irule/26972 "2017-03-16T14:41:48Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![truongh\_36312](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@truongh\_36312](https://community.f5.com/u/truongh_36312)\
**Post date:** [March 16, 2017, 2:41pm UTC](https://community.f5.com/t/convert-http-class-to-irule/26972/1 "2017-03-16T14:41:48Z")

</div>

Hi, Please help to convert http class to irule. Http class included: - Hosts match all URI Path List (regex)(?i) administrator. - Redirect to [http://a.b.c.gov](http://a.b.c.gov) Thanks for your help.

---

<div class="post-metadata">

**Author:** ![truongh\_36312](https://avatars.discourse-cdn.com/v4/letter/t/898d66/32.png) [@truongh\_36312](https://community.f5.com/u/truongh_36312)\
**Post date:** [March 16, 2017, 2:52pm UTC](https://community.f5.com/t/convert-http-class-to-irule/26972/2 "2017-03-16T14:52:39Z")

</div>

Below is my irule but I’m not sure it is equivalent to http class: when HTTP\_REQUEST {

if { ([string tolower [HTTP::host]] eq “[a.b.gov](http://a.b.gov)”) and ([string tolower [HTTP::uri]] eq “(regex)(?i)administrator”) } { HTTP::redirect "; } }
