Forum Discussion
A__N_5261
Feb 02, 2012Nimbostratus
https Redirect
Hi All,
We have irule which redirecting to HTTPS. when i apply to HTTP VS . it give erro http profile should be configure
Why we have attach http profile. What is use of it
when HTTP_REQUEST
{ HTTP::redirect https://[HTTP::host][HTTP::uri] }
1. What irule says.
2. Why http profile require. I used default Http profile it works
Thanks
A.N
- natheCirrocumulusA.N
- A__N_5261NimbostratusHi nathan
- natheCirrocumulusA.N
- A__N_5261NimbostratusNathan
- natheCirrocumulusA.N
- nitassEmployeei agree with nathan. http profile and irule seem to be the most straight way to achieve this. anyway, if you can't use http profile, you have to collect tcp payload, parse http header and response manually.
[root@ve1023:Active] config b virtual bar list virtual bar { destination 172.28.19.79:80 ip protocol 6 rules myrule } [root@ve1023:Active] config b rule myrule list rule myrule { when CLIENT_ACCEPTED { TCP::collect } when CLIENT_DATA { set uri [findstr [TCP::payload] "GET " 4 " "] set host [findstr [TCP::payload] "Host: " 6 "\r\n"] TCP::respond "HTTP/1.0 302 Found\r\nLocation: https://$host$uri\r\nConnection: Keep-Alive\r\nContent-Length: 0\r\n\r\n" TCP::release } } [root@ve1023:Active] config curl -i http://172.28.19.79/whatever HTTP/1.0 302 Found Location: https://172.28.19.79/whatever Connection: Keep-Alive Content-Length: 0
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