Forum Discussion
aj11
Nov 20, 2017Nimbostratus
iRule Redirect by IP?
We're decommissioning a site where the web servers are behind a VIP. What we've done so far is remove the DNS entry so it is no longer accessible by entering the URL for it. Security scans are stil...
Vijay_E
Nov 20, 2017Cirrus
You can use [HTTP::host]. Also, assuming all the sites have specific redirects, you can also use an "else" statement to send all traffic that doesn't match alphasite or betasite to https://our.production.website.com[HTTP::uri]. In short, anything that doesn't match any previous statement will be sent to the site provided by the last else statement.
So, this will be the last statement in your iRule:
} else { HTTP::respond 301 Location "https://our.production.website.com[HTTP::uri]\r\nStrict-Transport-Security: max-age=31536000" }
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