Forum Discussion
Jacob_Becker_41
Nimbostratus
Jun 21, 2006https redirect
I'm trying to do a irule that will account for the following situation. If a person goes to https://felixlive.com I want it to redirect to https://www.felixlive.com. I've tried the following rul...
Jacob_Becker_41
Nimbostratus
Jun 21, 2006So couple of things I want to make sure I understand correctly. With this rule I want to catch people trying to going to https. With that said I'm assuming that the rule needs to be applied to the ssl web pool that I have sent up. So when I tried the following rule
when HTTP_REQUEST {
if {[HTTP::host] equals "felixlive.com" } {
HTTP::redirect https://www.felixlive.com/
}
}I received a redirect problem from my browser. My question is I also have a rule setup on the regular web pool (port 80 traffic) which is the following:
when HTTP_REQUEST {
log local0. "Host: [HTTP::host], URI: [HTTP::uri]"
if { [HTTP::host] starts_with "felixlive.com" } {
log local0. "host matched felixlive.com"
HTTP::redirect "https://www.felixlive.com"
} elseif { [HTTP::host] starts_with "www.felixlive.com" } {
log local0. "host matched www.felixlive.com"
HTTP::redirect "https://www.felixlive.com"
} else {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}Am I getting the redirect problem from this chunk in second rule
if { [HTTP::host] starts_with "felixlive.com" } {
log local0. "host matched felixlive.com"
HTTP::redirect "https://www.felixlive.com"or is there something else that I'm missing?
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
