Forum Discussion
Stanislas_Piro2
Nov 20, 2015Cumulonimbus
The 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]"
}