# iRule help for beginner

**URL:** <https://community.f5.com/t/irule-help-for-beginner/7089>\
**Category:** Technical Forums\
**Tags:** irules, devops, application-delivery\
**Created:** [March 12, 2014, 5:48pm UTC](https://community.f5.com/t/irule-help-for-beginner/7089 "2014-03-12T17:48:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![fhoban\_128910](https://avatars.discourse-cdn.com/v4/letter/f/7c8e57/32.png) [@fhoban\_128910](https://community.f5.com/u/fhoban_128910)\
**Post date:** [March 12, 2014, 5:48pm UTC](https://community.f5.com/t/irule-help-for-beginner/7089/1 "2014-03-12T17:48:45Z")

</div>

hi,

Have a very easy question.I am looking for an i rule to do the following. FW Public IP \> LB listneing on Port 80 \> Real Server Pool listening on Port 90xx Service is advertised as follows to internet … [http://x.x.x.x/NameofService](http://x.x.x.x/NameofService). I only want to advertise this exact URL/service and all other requests to get an error page back from F5 ( eg Service Unavailable ) Currently I have only one server deployed behind this VIP , probably will be more but not at the moment.

Thanks in advance

---

<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:** [March 12, 2014, 7:44pm UTC](https://community.f5.com/t/irule-help-for-beginner/7089/2 "2014-03-12T19:44:14Z")

</div>

Assuming there’s a single DNS entry that resolves to the virtual server IP, and you only really care about the URI, something like this might work:

```tcl
when HTTP_REQUEST {
    if { not ( [string tolower [HTTP::uri]] equals "/nameofservice" ) } {
        HTTP::respond 200 content "Service Unavailable"
    }
}

```
