Mar 27, 2026 - For details about updated CVE-2025-53521 (BIG-IP APM vulnerability), refer to K000156741.

Forum Discussion

Chad_14648's avatar
Chad_14648
Icon for Nimbostratus rankNimbostratus
Oct 23, 2009

domain rewrite

I need to change requests coming in for mydomain.org to mydomain.com but I can't seem to get it working...

3 Replies

  • I haven't been using one - this is a new requirement - but this is the closest I've been able to come. It's modified from an example I found.

     

     

    when HTTP_REQUEST {

     

    switch -glob [HTTP::host] {

     

    "*mydomain.org" { HTTP::header replace "Host" [string map {"mydomain.org" "mydoming.com"} [HTTP::host]] }

     

    }

     

    }
  • Hi Chad,

    Try the following:

     
     when HTTP_REQEUST { 
          if { [HTTP::host] eq "mydomain.org" } { 
                HTTP::redirect "http://mydomain.com/[HTTP::uri]" 
             } 
     } 
     

    I hope this helps

    CB