Forum Discussion

yosry92_331999's avatar
yosry92_331999
Icon for Nimbostratus rankNimbostratus
Jan 05, 2018

irule to redirect group of uri to maintenance page?

i want iRule to use html page that i have created to appear to users when they access certain uri. is there a way to redirect all traffic under /buy to maintenance page ??

 

1 Reply

  • Hi, if you have created your page and hosted it somewhere, you can use the following simple iRule to redirect based on the URI:

    when HTTP_REQUEST {
        if {[HTTP::uri] starts_with "/buy"} {
            HTTP::redirect "http://maintenance.page"
        }
    }
    

    This can also be done with a LTM Traffic Policy if you don't want to use iRules.

    However, if you have created an HTML page and need to host it, you can potentially use iFiles

    https://devcentral.f5.com/codeshare?sid=625