Forum Discussion
Jason_40769
Jul 12, 2011Nimbostratus
redirect 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
- Jason_40769Nimbostratusbump
- hooleylistCirrostratusHi Jason,
when HTTP_REQUEST { if { "[string tolower [HTTP::host]][HTTP::uri]" eq "mysite.fun.com/"}{ HTTP::redirect "https://mysite.fun.com/" } }
- hooleylistCirrostratus...
- Jason_40769NimbostratusIll give it a shot right now
- Jason_40769NimbostratusThanks 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