Forum Discussion
Eric_Chen
Employee
Mar 09, 2015Python Virtual Server and Pool Creation
Problem this snippet solves: A simple script to add and delete both Virtual IPs and Pools in: Python Code : import requests, json, time
# define program-wide variables
BIGIP_ADDRESS = 'test-ltm-0...
Mar 14, 2007
The value of HTTP::host does not include the protocol specifier. This should work for you.
when HTTP_REQUEST {
if { [HTTP::host] eq "domain.com" } {
HTTP::redirect "https://www.domain.com[HTTP::uri]"
}
}
The only issue you need to be aware of with redirects is that you don't to get into a infinite loop where you keep redirecting to the same iRule recursively.
Theoretically it's best practice to create separate virtuals for each port (80 and 443). This will also help avoid recursive redirection.
-Joe