Forum Discussion

ElvisS's avatar
ElvisS
Icon for Nimbostratus rankNimbostratus
Mar 28, 2011

HTTP Redirects with IRULES

I have been trying to get an IRULE to throw up a "page has moved, please update your bookmarks" page. I want the LTM to display the message, wait 10 seconds and redirect to the new URL. I got it to do that; but I'm not sure how to force it to keep the same path. For example; website.com/index2.html --> newwebsite.com/index2.html. I am not a web programmer so any help would be greatly appreciated.

 

4 Replies

  • ElvisS's avatar
    ElvisS
    Icon for Nimbostratus rankNimbostratus
    With the help of F5 support I have the following which does throw up the temp page and redirects but the full path is not maintained and that's what the user's want...

     

     

    when HTTP_REQUEST {

     

    if {[HTTP::host] equals {test-site.example.edu}} {

     

    HTTP::respond 200 content {

     

     

     

    The address you are attempting to reach is outdated. test-site.example.edu has been replaced by new-site.example.edu. Please update your bookmarks accordingly. You will be redirected to the new address in 10 seconds. Please click here to go to the new address now.

     

     

     

    }

     

    }

     

    }

     

  • ElvisS's avatar
    ElvisS
    Icon for Nimbostratus rankNimbostratus
    With the help of F5 support I have the following which does throw up the temp page and redirects but the full path is not maintained and that's what the user's want...

     

     

    when HTTP_REQUEST {

     

    if {[HTTP::host] equals {test-site.example.edu}} {

     

    HTTP::respond 200 content {

     

     

     

    The address you are attempting to reach is outdated. test-site.example.edu has been replaced by new-site.example.edu. Please update your bookmarks accordingly. You will be redirected to the new address in 10 seconds. Please click here to go to the new address now.

     

     

     

    }

     

    }

     

    }

     

  • ElvisS's avatar
    ElvisS
    Icon for Nimbostratus rankNimbostratus
    With the help of F5 support I have the following which does throw up the temp page and redirects but the full path is not maintained and that's what the user's want...

     

     

    when HTTP_REQUEST {

     

    if {[HTTP::host] equals {test-site.example.edu}} {

     

    HTTP::respond 200 content {

     

     

     

    The address you are attempting to reach is outdated. test-site.example.edu has been replaced by new-site.example.edu. Please update your bookmarks accordingly. You will be redirected to the new address in 10 seconds. Please click here to go to the new address now.

     

     

     

    }

     

    }

     

    }