Forum Discussion
Dec 10, 2019
Hi David,
Can you share iRule?
- David_MDec 10, 2019Cirrostratus
I tried few things but it did not work ..one is to replace the link from the response but still nothing . .
when HTTP_REQUEST { HTTP::header remove Accept-Encoding STREAM::disable } when HTTP_RESPONSE { if { [HTTP::header exists Location] } { HTTP::header replace Location [string map {"https://domain.com/the-uri-needed" "https://domain.com/"} [HTTP::header Location]] } if { [HTTP::header Content-Type] contains "text" } { STREAM::expression {@https://domain.com/the-uri-needed@https://domain.com/@} } STREAM::enable }
This is one..
And another one to do the normal redirect from hostname to hostname/uri.
- David_MDec 11, 2019Cirrostratus
any ideas?
- Dec 11, 2019
I think, this iRule looking clean.
Could each request match the redirect iRule?
Example loop:
when HTTP_REQUEST { if { [HTTP::uri] starts_with "/" } { HTTP::redirect "https://domain.com/the-uri-needed" } }