Forum Discussion
Ed_Lane_26850
Jun 24, 2011Nimbostratus
irule redirect
I am having trouble with creating an irule that will redirect when url http://www.offer.sportography.com is received and redirect it to http://offer.sportography.com dropping the www from the url.
thanks much, Ed Lane
- Colin_Walker_12Historic F5 AccountAll you'd need is:
when HTTP_REQUEST { if {[HTTP::host] equals "www.offer.sportography.com"} { HTTP::redirect "http://[string trimleft [HTTP::host] 'w.']" } }
- hooleylistCirrostratusstring trimleft is a novel solution Colin. And it seems to perform as well as a string range command. Nice work :)
- Colin_Walker_12Historic F5 AccountHah, thanks. ;)
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