Forum Discussion
Jean_Mamène
Cirrus
May 29, 2019Irule redirect all paths /* of my domain
Hello, I will need to set up a redirection for all the paths of my domain name. Example : https://test01.test.com/* => https://test02.test.com Thank you in advance for your feedback. Reg...
Jean_Mamène
Cirrus
May 29, 2019Sorry I made a mistake in my example Lee Sutcliffe.
I want redirect https://test01.test.com/* => https://test01.test.com
Thanks in advance.
Regards,
Lee_Sutcliffe
Nacreous
May 29, 2019Thanks for the update.
You'll need to be careful with this one as you risk causing a redirect loop, given you're redirecting to the same location. The following iRule will redirect only if the URI is not equal to the root path. This should stop requests getting stuck in a loop. Make sure you test this in a non production environment first.
when HTTP_REQUEST {
if {([HTTP::host] equals "test01.test.com") && !([HTTP::uri] equals "/")} {
HTTP::redirect https://test01.test.com
}
}Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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