Forum Discussion
MervLama_235015
Nimbostratus
Nov 20, 2015iRule redirect from sports.test.co.uk/ioks/* to www.test.co.uk/ioks/*
Hi
I wonder if you can assist me on this. I need to write an iRule to redirect incoming traffic from sports.test.co.uk/ioks/* to www.test2.co.uk/ioks/*
The VIP has already an iRule redirection...
Stanislas_Piro2
Cumulonimbus
Nov 20, 2015The best solution is to create the new statement in the existing irule.
the Location header can contain only URI or all URL
- /ioks/ --> OK
- https://www.test2.co.uk/ioks/ --> OK
but not hostname without protocol :
- www.test2.co.uk/ioks/ --> WRONG
So the right code is (URI is added in the Location header as your question contains wildcard):
elseif {[HTTP::path] starts_with "/ioks/"} {
HTTP:: respond 301 Location "http://www.test2.co.uk[HTTP::uri]"
log local0. "This is iojs [HTTP::uri]"
}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