# Rewrite HTTP Address Displaying

**URL:** <https://community.f5.com/t/rewrite-http-address-displaying/60734>\
**Category:** Technical Forums\
**Tags:** super-netops, irules\
**Created:** [March 23, 2018, 12:02am UTC](https://community.f5.com/t/rewrite-http-address-displaying/60734 "2018-03-23T00:02:41Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ben\_Noonan](https://avatars.discourse-cdn.com/v4/letter/b/bb73d2/32.png) [@Ben\_Noonan](https://community.f5.com/u/Ben_Noonan)\
**Post date:** [March 23, 2018, 12:02am UTC](https://community.f5.com/t/rewrite-http-address-displaying/60734/1 "2018-03-23T00:02:41Z")

</div>

Hi All,

I don’t know if this is possible but I am trying to make the end user not see the page redirect in the address bar.

For Example:

User goes to _[webpage.domain.com/loginpage](http://webpage.domain.com/loginpage)_

That hits a VIP which redirects the traffic to _[server.doamin.com/loginpage](http://server.doamin.com/loginpage)_

Now can I make it so in the address bar it is still showing [webpage.domain.com/loginpage](http://webpage.domain.com/loginpage) instead of [server.doamin.com/loginpage](http://server.doamin.com/loginpage) ?

**This is what I have some up with so for, bare in mind still new to iRules:**

```tcl
when HTTP_REQUEST {
if {
    [string tolower[HTTP::host] not "webpage.domain.com"]}{ 
    HTTP::header replace host "webpage.domain.com"}
    return
}

```

---

<div class="post-metadata">

**Author:** ![Only1masterbla1](https://avatars.discourse-cdn.com/v4/letter/o/a9adbd/32.png) [@Only1masterbla1](https://community.f5.com/u/Only1masterbla1)\
**Post date:** [March 23, 2018, 12:58am UTC](https://community.f5.com/t/rewrite-http-address-displaying/60734/2 "2018-03-23T00:58:15Z")

</div>

Address bar will not change with iRule. Client needs to re-connect to the redirected page.

---

<div class="post-metadata">

**Author:** ![Surgeon](https://avatars.discourse-cdn.com/v4/letter/s/ce73a5/32.png) [@Surgeon](https://community.f5.com/u/Surgeon)\
**Post date:** [March 23, 2018, 1:33am UTC](https://community.f5.com/t/rewrite-http-address-displaying/60734/3 "2018-03-23T01:33:18Z")

</div>

Not totally clear what you are going to reach. Do you still want clients go to [server.doamin.com/loginpage](http://server.doamin.com/loginpage) or you just want to replace HOST header?

If you want clients go to [server.doamin.com/loginpage](http://server.doamin.com/loginpage) then you have to use redirect. If you do not use redirect, how are you going to notify clients about new host?

If you want just replace HOST header than your iRule should work
