Forum Discussion
Tyson_James
Cirrus
May 24, 2018Very simple iRule to specific URI....
I am new to iRules and am trying to do a simple "redirect" of sorts. I have the need for anyone going to https://server.domain.com/anything-beyond-the-slash be "redirected" to the the virtual servers' pool, but add text to the URI. Below is what I have tried so far and it is not working :
when HTTP_REQUEST {
if {[string tolower [HTTP::host]] starts_with "server.domain.com" && [HTTP::path] contains "/"} {
HTTP::uri "/add-this-text/[HTTP::uri]"
}
}
Any assistance is greatly appreciated.
- Tyson_James
Cirrus
Figured it out. It was working the entire time, but we had "require AD authentication" turned on for the website. Once we realized that, we were good. 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