Forum Discussion
HTTPS to HTTP rewrite
I need an irule which will rewrite a hosts response from HTTPS to HTTP.
3 Replies
- Kevin_Stewart
Employee
A server's response? Is the response a 30x redirect or URLs in the payload?
when HTTP_REQUEST { HTTP::header remove Accept-Encoding STREAM::disable } when HTTP_RESPONSE { if { ( [HTTP::header exists Location ) and ( [HTTP::header Location] contains "https://" ) } { HTTP::header replace Location [string map -nocase {"https://" "http://"} [HTTP::header Location]] } if { [HTTP::header Content-Type] contains "text" } { STREAM::expression {@https://@http://@} STREAM::enable } } - pedinopa_170325
Nimbostratus
when I copy this irule I get
01070151:3: Rule [/Common/HTTPS-HTTP-Redirect] error: /Common/HTTPS-HTTP-Redirect:6: error: [parse error: PARSE missingBracket 114 {missing close-bracket}][{ ( [HTTP::header exists Location ) and ( [HTTP::header Location] contains "https://" ) }]
- Kevin_Stewart
Employee
Forgot the trailing closing square bracket "]" in the HTTP::header exists Location statement.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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