Forum Discussion

Wasim_Hassan_13's avatar
Wasim_Hassan_13
Icon for Nimbostratus rankNimbostratus
Jun 10, 2014

Redirect user to external URL

Hi,   I have one requirement for the URL rewrite.   i want my internal and external users they hit on   www.mycompany.com it should redirect to the external website to www.somewhereelse.co...
  • Sven_Leupold_85's avatar
    Jun 10, 2014

    You can try and implement this iRule:

    when HTTP_REQUEST {
      if { [string tolower [HTTP::host]] equals "www.mycompany.com" } {
        HTTP::redirect "http://www.somewhereelse.com"
      }
    }
    

    You will not need any pool for that. Just apply to the virtual server that handles www.mycompany.com. The client will resolve www.somewhereelse.com on his own and reconnect to the www.somewhereelse.com resource.