Forum Discussion

Yogeshwar's avatar
Yogeshwar
Icon for Nimbostratus rankNimbostratus
Aug 11, 2022

F5 Rewrite i rule to a different URL

Hello,

I want a rewrite.  When the user goes to http://abc:12345//aaaaa/bbbbbbb I want the browser to stay at the same URL but see the contents of  http://xyz.mmm.com/aaaaa/bbbbbbb

please sugest. i have never used a rewrite irule before.

  • Yogeshwar, try the following irule. What's the version and model of your f5?

    when HTTP_REQUEST {
    if { ([string tolower [HTTP::host]] equals "xyz.mmm.com") }{
    HTTP::header replace Host "abc.com"
     }
    }
    when HTTP_RESPONSE {
    HTTP::header replace Host "xyz.mmm.com "
    }

  • Yogeshwar - did pstoianov's reply help you out? If yes, could you please click Accept as Solution on their response so that anyone else looking to solve the same issue knows what the resolution is? 🙂