Forum Discussion

  • 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