Forum Discussion
Pandiarajan_701
Jun 24, 2012Nimbostratus
HTTPS >>> HTTP Redirect
Hi, We have a redirection configured for the URL http://stp.xxx.com.sa as below which is working fine. when HTTP_REQUEST { if { [HTTP::host] eq "stp.XXX.com.sa" } { pool ...
nitass
Jun 27, 2012Employee
in case you would like to try irule. additionally, you may put url into data group and use class match command in irule instead of hard-coding url in the irule as following.
[root@ve1024:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.79:443
ip protocol 6
rules myrule
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve1024:Active] config b rule myrule list
rule myrule {
when HTTP_REQUEST {
switch [HTTP::uri] {
"/stwebclient/index.jsp" -
"/stbaseapi/baseComps.js?lang=ar" {
HTTP::redirect http://[HTTP::host][HTTP::uri]
}
}
}
}
[root@ve1024:Active] config curl -Ik https://172.28.19.79/stwebclient/index.jsp -H "Host:stp.xxx.com.sa"
HTTP/1.0 302 Found
Location: http://stp.xxx.com.sa/stwebclient/index.jsp
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1024:Active] config curl -Ik https://172.28.19.79/stbaseapi/baseComps.js?lang=ar -H "Host:stp.xxx.com.sa"
HTTP/1.0 302 Found
Location: http://stp.xxx.com.sa/stbaseapi/baseComps.js?lang=ar
Server: BigIP
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