Redirection type 301 sur un F5 Article original Publié le : 9 avril 2021 Mise a jour le : – Le redirect peut etre fait en policies ou en irules, quelques exemples selon les cas I. Irules Uri est égale a
1 2 3 4 5 6 7 |
Local Traffic ›› iRules : iRule List ›› redirect_irules when HTTP_REQUEST { if { ([string tolower [HTTP::host]] eq "<strong>url</strong>") and ([string tolower [HTTP::uri]] eq "<strong>/uri/</strong>") } { HTTP::respond 301 Location "<strong>https://redirection</strong>" } } |
Uri commençant par
1 2 3 4 5 6 7 |
Local Traffic ›› iRules : iRule List ›› redirect_irules when HTTP_REQUEST { if { ([string tolower [HTTP::host]] eq "<strong>url</strong>") and ([string tolower [HTTP::uri]] starts_with "<strong>/uri/</strong>") } { HTTP::respond 301 Location "<strong>https://redirection</strong>" } } |
Pour une uri spécifique (starts_with, […]