Forum Discussion
dirome
Cirrus
Jul 17, 2013Redirect frotm port http:test:7778 to https:test:7778
Hi,
I have two Virtual server,a for the profile http and the other for profile https, when i do test for the redirect since port http://test/7778 to https://test/7778 dont work, because ...
nitass
Employee
Jul 27, 2013We have the portal http://test:123/index.html and need redirect to https://test:123/index.htmlhave you tried to enable nonssl? anyway, i think it may not be a good idea.
e.g.
[root@ve10:Active] config b virtual bar list
virtual bar {
snat automap
pool foo
destination 172.28.19.252:123
ip protocol 6
rules myrule
profiles {
http {}
myclientssl {
clientside
}
tcp {}
}
}
[root@ve10:Active] config b profile myclientssl list
profile clientssl myclientssl {
nonssl enable
}
[root@ve10:Active] config b rule myrule list
rule myrule {
when CLIENT_ACCEPTED {
set is_ssl 0
}
when CLIENTSSL_HANDSHAKE {
set is_ssl 1
}
when HTTP_REQUEST {
if { not ($is_ssl) } {
HTTP::redirect "https://[HTTP::host][HTTP::uri]"
}
}
}
[root@ve10:Active] config b pool foo list
pool foo {
members 200.200.200.101:80 {}
}
non-ssl
[root@ve10:Active] config curl -I http://172.28.19.252:123/something
HTTP/1.0 302 Found
Location: https://172.28.19.252:123/something
Server: BigIP
Connection: Keep-Alive
Content-Length: 0
ssl
[root@ve10:Active] config curl -Ik https://172.28.19.252:123/something
HTTP/1.1 404 Not Found
Date: Sun, 28 Jul 2013 04:35:09 GMT
Server: Apache/2.2.3 (CentOS)
Content-Type: text/html; charset=iso-8859-1
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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