Glenn_Ruffus_10
Dec 18, 2007Nimbostratus
Force "www." redirect if missing from HTTPS requests
I am looking for help in writing an iRule that will be used on an HTTPS virtual server. I would like the LTM to examine the HTTP request and if the URL does not include "www." then redirect the browser to come back to the same URL/URI as found in the original request, only with www. put on the front of the URL. I am doing this so that the requested URL will always match the URL on the digital certificate. I'd like the iRule to be generic so that it can be applied to any virtual server regarding any URL/URI.
Example:
If an HTTP(S) request comes in for fred.flintstone.com/pebbles/dino...
then redirect the browser to come back as: https://www.fred.flintstone.com/pebbles/dino...
If the HTTP(S) request comes in for www.fred.flintstone.com/pebbles/dino... then don't take any further action because the requested URL matches the URL on the digital certificate.
Thanks.
Glenn