Forum Discussion
a_basharat_2591
Nov 03, 2016Nimbostratus
Rule for Policies to Redirect a specific URL
Hi,
I have tested the Irules for redirection, but want to do the same with Policies/Rules, So what I have done is:
Create a new Policy Create a new Rule inside that Policy for the HTTP re...
- Nov 03, 2016
Please try these irule. Hope it will work as per your requirement.
when HTTP_REQUEST { if { [HTTP::host] equals "testredirection.com" } { HTTP::respond 301 Location "https://google.co.uk" } }
OR
when HTTP_REQUEST { switch -glob [HTTP::header "Referer"] { "https://testredirection.com/*" { HTTP::respond 301 Location "https://google.co.uk" } default { HTTP::redirect [HTTP::header "Referer"] } } }
a_basharat
Nov 03, 2016Nimbostratus
If I change the Rule [leaving all the parameters same] to http://testredirection.com/ [with /] it doesn't redirect either. So Do I need to use a different Match method?
Recent Discussions
Related Content
DevCentral Quicklinks
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com
Discover DevCentral Connects