Forum Discussion
Terry_Pike
Apr 07, 2017Nimbostratus
iRule to redirect with an elseif statement
hi Dev's
Want an iRule to detect the URL – http://xxsupplier.xx.com/supplierguide
and re-direct it to https://xxsupplier.xx.com/supplier_guide.html
But, if the user enters just http://xxsupplier.xx....
samstep
Apr 07, 2017Cirrocumulus
Hi Terry,
If you are getting the connection drop that is a tell-tale sign of your iRule having a bug somewhere, so it is useful to check the /var/log/ltm for any error messages. In your case it looks like you used eleseif, but forgot the condition, I assume you wanted that line to be
elseif { [HTTP::host] equals "xxsupplier.xx.com" }
Also, get rid of the semicolon before elseif
Hope this helps,
Sam
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