Forum Discussion

Parveez_70209's avatar
Parveez_70209
Icon for Nimbostratus rankNimbostratus
Mar 10, 2015

Redirection from http://s1.test.com/a-o1/* to http://o1.test.com/a-o1/*

Hi Team,

 

How to do the below redirection:

 

Whenever a user browse http://s1.test.com/a-o1/* , it should redirect to http://o1.test.com/a-o1/*

 

Kindly guide.

 

Thanks and Regards Parveez

 

1 Reply

  • Hi Parveez, it would look like this and will require a virtual server in standard mode with http-profile:

    when HTTP_REQUEST {
       if {([string tolower [HTTP::host]] equals "s1.test.com") and ([string tolower [HTTP::path]] starts_with "/a-o1")} {
          HTTP::redirect "http://o1.test.com[HTTP::uri]"
          return
       }
    }
    

    Thanks, Stephan