Forum Discussion
Jason_40769
Nimbostratus
Jul 12, 2011redirect that passes all other traffic
I have been trying to create an irule that will redirect the primary site from its http version to its https version but still allows http subsite traffic to pass
For example
when HTTP_REQUEST {
if { [HTTP::host] == "mysite.fun.com"}{
HTTP::redirect "https://mysite.fun.com[http_uri]"
}
}
-------
So if someone types http://mysite.fun.com i want them to go to https://mysite.fun.com
but if someone types http://mysite.fun.com/players i want them to go to http://mysite.fun.com
please advise
5 Replies
- Jason_40769
Nimbostratus
bump - hoolio
Cirrostratus
Hi Jason,when HTTP_REQUEST { if { "[string tolower [HTTP::host]][HTTP::uri]" eq "mysite.fun.com/"}{ HTTP::redirect "https://mysite.fun.com/" } }
- hoolio
Cirrostratus
... - Jason_40769
Nimbostratus
Ill give it a shot right now - Jason_40769
Nimbostratus
Thanks this worked great! I tried something very similar to this but i didnt try the string to lower command.
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