Forum Discussion
iRule for HTTP redirect from retired URL to new HTTPS URL
Try this iRule. It will work per your requirement. Let us know if any question
when HTTP_REQUEST {
if { [HTTP::host] equals "www.oldsite.com" } {
HTTP::redirect "https://www.newsite.com"
}
}- Sri_Narasimha_11Feb 28, 2020
Altostratus
Thanks Samir, Hope this is Permanent re-direct (301).
And please be informed, the new URL is external public URL and hope no extra config required at the F5 or firewall rules..
- SamirFeb 28, 2020
MVP
Above irule will redirected traffic if any user access "www.oldsite.com" but again you need enable firewall rule for new site "www.newsite.com".
Will suggest you check the access "www.newsite.com" in browser before placing irule else will not work.
- Sri_Narasimha_11Feb 28, 2020
Altostratus
Thanks for the reply. The confusion around here is, new site "www.newsite.com" isn't managed by our network. This is some external URL, so whether firewall rules are required...?
And, once the old URL is retired, hope we're good to remove the public DNS as well..
- Sri_Narasimha_11Feb 28, 2020
Altostratus
And to keep you informed, this is not working. I've applied this but no luck :(
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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
