Forum Discussion

Ravi_110217's avatar
Ravi_110217
Icon for Nimbostratus rankNimbostratus
Mar 11, 2008

HTTP page redirection request

Hello Guys,

 

 

I wonder if someone could help me with following web page redirection rule. I am not much more familiar with F5 product, please help me out with my following request.

 

I want to redirect one of our web page... example,

 

 

www.abc.com.au to

 

www.abc.com.au/abconline/HomePage.aspx

 

 

I have written following irule but does not seem to be working for me.

 

 

when HTTP_REQUEST {

 

if { [HTTP::host] equals "www.abc.com.au" }

 

{

 

HTTP::redirect "http://www.abc.com.au/abconline/HomePage.aspx"}

 

}

 

 

 

I'm using following IOS on my F5:

 

BIG-IP 9.3.0 Build 187.3...

 

 

 

Hope to hear soon.

 

Ta,

 

 

2 Replies

  • Hi,

     

     

    Here you will redirect any request done on the website www.abc.com.au on this page: www.abc.com.au/abconline/HomePage.aspx

     

     

    Any request done on the website www.abc.com.au will contain this value in the HTTP host header.

     

     

    If you want to redirect only when user are typing http://www.abc.com.au in their browser you should try the following:

     

     

    when HTTP_REQUEST {

     

    if { ([HTTP::host] equals "www.abc.com.au") and ([HTTP::uri] equals "/") } {

     

    HTTP::redirect "http://www.abc.com.au/abconline/HomePage.aspx"}

     

    }

     

  • Hi ,

     

    Thanks for your quick response... I have done whatever you have mentioned above but still does not seem to be working. I am not sure how to get log files and how to debug one irule. Your suggestion will be appreciated.

     

    I would like to know that where would I apply this IRULE? Do I need to apply to Virtual Server or somewhere else ? I have got couple of virtual servers but I'm not sure where do I need to apply this rule?

     

     

    I am very much new with this product and don't know much more about it....