Forum Discussion
Adam_Borders_10
Aug 18, 2011Nimbostratus
iRule Newbie learning - need validation
I want to validate the this iRule will do as I think. What I want to do is evaluate the request for a redirect to https. If the user connects to domain.com instead of www.domain.com I want to add the ...
hooleylist
Aug 22, 2011Cirrostratus
@bmoran- can you explain how this line works? Are you taking every host request and if it has the www. on it, strip it off and add the https://www.?
HTTP::redirect https://www.[string trimleft [HTTP::host] "www."][HTTP::uri]
That's exactly it. I'm not sure whether that's more efficient than having a separate switch case for host values starting with www., but you have a good understanding of what that line is doing.
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