Forum Discussion

Jay_Prasanth_13's avatar
Jay_Prasanth_13
Icon for Nimbostratus rankNimbostratus
Oct 14, 2014

how to exclude specific url from 404 custom redirects

We have iRule configured for 404 error code. This irule redirects 404 error to custom url For eg. http://abc.com/xx/404

 

We would like to exclude one url from this redirection. Only the excluded url should show 404 error in the browser.

 

2 Replies

  • R_Eastman_13667's avatar
    R_Eastman_13667
    Historic F5 Account

    if {[HTTP:host] starts_with "http://abc.com/"} { HTTP::redirect "http://abc.com/xx/404" }

     

    • Jay_Prasanth_13's avatar
      Jay_Prasanth_13
      Icon for Nimbostratus rankNimbostratus
      Thanks for your response . Iam not asking for include , I just want exclude one url from 404 redirection. This is my current redirection iRule when HTTP_RESPONSE { if { [HTTP::status] eq "404" } { HTTP::redirect "https://abc.com/xx/404" } } With above iRule ALL mistyped url redirects to https://abc.com/xx/404 . But I want to exclude one url from this redirection , so that the excluded specific url should show 404 HTTP error code in the browser. Let me know if still not cleared.