# URL redirection

**URL:** <https://community.f5.com/t/url-redirection/24253>\
**Category:** Technical Forums\
**Tags:** irules, dev, devops, application-delivery\
**Created:** [February 18, 2010, 4:21am UTC](https://community.f5.com/t/url-redirection/24253 "2010-02-18T04:21:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ashok\_65614](https://avatars.discourse-cdn.com/v4/letter/a/50afbb/32.png) [@ashok\_65614](https://community.f5.com/u/ashok_65614)\
**Post date:** [February 18, 2010, 4:21am UTC](https://community.f5.com/t/url-redirection/24253/1 "2010-02-18T04:21:15Z")

</div>

Need to redirect the URL as below.

When a request is received as [https://www.abc.com/](https://www.abc.com/) it has to be redirected to [https://www.abc.com/test/Login.html](https://www.abc.com/test/Login.html)

Could any one help by providing the iRule

---

<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:** [February 18, 2010, 5:16am UTC](https://community.f5.com/t/url-redirection/24253/2 "2010-02-18T05:16:30Z")

</div>

Hi Ashok,

You could try the following

```tcl
when HTTP_REQUEST { 
    if {([HTTP::host] eq "www.abc.com") and ([HTTP::uri] eq "/") } { 
           HTTP::redirect "https://www.abc.com/test/Login.html" 
       } 
 }

```

I hope this helps

Bhattman
