Forum Discussion
chungyu_16122
Altostratus
Nov 29, 2018Irule to redirect all URI from old site to a new site with matching URI
Hi all
How can I write an iRule that will redirect all URI from one site to a new site and match the URI
https://www.universitysite.com/news-archives/ or anything under that to https://new-...
wlopez
Cirrocumulus
Nov 30, 2018You could also do it this way:
when HTTP_REQUEST {
if { [HTTP::host] equals "www.universitysite.com" } {
HTTP::respond 301 Location "new-site.com[HTTP::uri]"
}
}
Just modify the if statement to cover the scenarios you want to perform the redirect on.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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