Forum Discussion
irule for changing server http_response from http to https
Hello,
I had implemented a default stream profile in Virtual server with port 80 and 443. And a per client requirement i have a redirection irule for changing http_request from http to https on Virtual server with port 80. My server is on port 80.
Is there any irule to change the server response from http to https and on which virtual server i have to implement server response changing irule, i mean on VIP with port 80 or 443.
Thank you.
3 Replies
- nitass
Employee
Is there any irule to change the server response from http to https and on which virtual server i have to implement server response changing irule, i mean on VIP with port 80 or 443.
isn't stream profile usable?
root@(ve11a)(cfg-sync In Sync)(Active)(/Common)(tmos) list ltm profile stream mystream ltm profile stream mystream { app-service none defaults-from stream source http:// target https:// } - Vivek_Padale_16
Nimbostratus
Hello nitass,
I had mentioned in source tab http://abc.com and in target tab https://abc.com of my stream profile on virtual server 80 and I had also applied the below response irule for changing serv er response on virtual server with port 443:- when HTTP_REQUEST { STREAM::disable if {[HTTP::header exists "Accept-Encoding"]}{ HTTP::header remove "Accept-Encoding" } } when HTTP_RESPONSE { if {[HTTP::header value Content-Type] contains "text"}{ STREAM::expression "@http://@https://@" STREAM::enable } }
After that i am able to login in to webpage but after login the webpages are not showing any content.
Is there any wrong stateemnts in the above irule?
Thank you
- nitass
Employee
if you configure source and target in stream profile, you do not need irule, and vice versa. anyway, i think the problem you are experiencing may not relate to it.
have you ever used http analyzer tool such as httpfox? it may be helpful.
HttpFox
https://addons.mozilla.org/en-US/firefox/addon/httpfox/
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