Forum Discussion

atultilekar_718's avatar
atultilekar_718
Icon for Nimbostratus rankNimbostratus
Feb 23, 2016

Help required for URL redirect on F5.

Help required for URL redirect on F5.

 

http://www.abcd.fi http://www.abcd.com http://www.abcd.net https://www.abcd.fi https://www.abcd.com https://www.abcd.net when we access any of the above website it is redirected to my main page http://www.alfatake.fi but the need is it should be redirected to "http://www.alfatake.fi/abcd" without disturbing my existing website which should work as it is www.alfatek.fi www.alfatek.net www.alfatek.com

 

could you please suggest an irule for it so i can fulfill my request.

 

2 Replies

  • Josiah_39459's avatar
    Josiah_39459
    Historic F5 Account
    when HTTP_REQUEST {
        switch [string tolower [HTTP::host]] {
            "www.abcd.fi" -
            "www.abcd.com" -
            "www.abcd.net" {
            HTTP::redirect "http://www.alfatake.fi/abcd"
            }
        }
    }
    
  • Hi Thanks for the help.One query that even if the requests come from HTTP or HTTPs it will work.