Forum Discussion
Ram_63318
Nimbostratus
Jun 10, 2008HTTP to HTTPS Redirection
1.) When customers goes directly to
http://vipnation.com/livenation/php/eventslist.php load balancer is not redirecting to https://vipnation.com/livenation/php/login.php
Redirect...
hoolio
Cirrostratus
Jun 11, 2008It looks like you have the concept down of how to evaluate the requested URI and send a redirect to the client. Now it's just a matter of deciding what logic to use in implementing the iRules. If you aren't sure of what you need, try what you have and add logging statements to track what's happening when it doesn't work. As it looks like you might being using two different rules on the two VIPs make sure to note which VIP the request is being made to in the logs.
when HTTP_REQUEST {
log local0. "[IP::client_addr]:[TCP::client_port]: new request on [TCP::local_port] to [HTTP::host][HTTP::uri]"
if { ! ([string tolower [HTTP::uri]] starts_with "/livenation/") } {
log local0. "[IP::client_addr]:[TCP::client_port]: redirecting https://vipnation.com/livenation/php/login.php"
HTTP::redirect "https://vipnation.com/livenation/php/login.php"
}
}
Aaron
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
