Forum Discussion
Mr_777_63981
Apr 06, 2012Nimbostratus
Redirection Issues
Hi everyone,
i am facing a problem and unable to solve it. I hope someone will help me solving this issue.
Let me explain the scenario.
In Data Group Members i have two lists ...
nitass
Apr 07, 2012Employee
not sure if i understand correctly. is it something like this?
[root@ve1023:Active] config b virtual bar80 list
virtual bar80 {
snat automap
pool foo
destination 172.28.19.79:80
ip protocol 6
rules rule80
profiles {
http {}
tcp {}
}
}
[root@ve1023:Active] config b class Secure list
class Secure {
{
"/abc"
"/x/ghj"
"httpsecure=Y"
"httpsecure=y"
}
}
[root@ve1023:Active] config b rule rule80 list
rule rule80 {
when HTTP_REQUEST {
if { [class match -- [string tolower [HTTP::uri]] contains Secure] } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
[root@ve1023:Active] config b virtual bar443 list
virtual bar443 {
snat automap
pool foo
destination 172.28.19.79:443
ip protocol 6
rules rule443
profiles {
clientssl {
clientside
}
http {}
tcp {}
}
}
[root@ve1023:Active] config b rule rule443 list
rule rule443 {
when HTTP_REQUEST {
if { not [class match -- [string tolower [HTTP::uri]] contains Secure] } {
HTTP::redirect "http://[HTTP::host][HTTP::uri]"
}
}
}
[root@ve1023:Active] config curl -I http://172.28.19.79/x/ghj/something
HTTP/1.0 302 Found
Location: https://172.28.19.79/x/ghj/something
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
[root@ve1023:Active] config curl -Ik https://172.28.19.79/zxcv/something
HTTP/1.0 302 Found
Location: http://172.28.19.79/zxcv/something
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