Forum Discussion
Chris_123510
Nimbostratus
Sep 17, 2013Simple URL redirect iRule
I am still very new to iRules, and I am trying to get the code correct for a simple URL redirect. The VS already has an iRule that will redirect traffic from port 80 to 443. Plus, I will need it to w...
brad9iner_11512
Altostratus
Mar 03, 2015I am trying to do something similar to this but I can't seem to get the re-direct to work. I'm trying to filter based on http_host and http_uri. Here is what I have currently:
when HTTP_REQUEST {
if { [HTTP::host] contains "sandboxcernercentral.com" }{
if { [HTTP::uri] starts_with "/audit-reports/admin/" }{
HTTP::redirect https://associates.sandboxcernercentral.com/sentinel/
}
}
}
When I am trying to browse to https://sandboxcernercentral.com/audit-reports/admin/ it is still taking me to that page and not actually re-directing me to the /sentinel.
- brad9iner_11512Mar 03, 2015
Altostratus
apologies for the unformatted post. I can't seem to get the code formatting to work properly.
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