Forum Discussion
ElvisS
Nimbostratus
Mar 28, 2011HTTP Redirects with IRULES
I have been trying to get an IRULE to throw up a "page has moved, please update your bookmarks" page. I want the LTM to display the message, wait 10 seconds and redirect to the new URL. I got it to do that; but I'm not sure how to force it to keep the same path. For example; website.com/index2.html --> newwebsite.com/index2.html. I am not a web programmer so any help would be greatly appreciated.
4 Replies
- Michael_Yates
Nimbostratus
Can you show us you have so far or are you looking for a total solution? - ElvisS
Nimbostratus
With the help of F5 support I have the following which does throw up the temp page and redirects but the full path is not maintained and that's what the user's want...
when HTTP_REQUEST {
if {[HTTP::host] equals {test-site.example.edu}} {
HTTP::respond 200 content {
The address you are attempting to reach is outdated. test-site.example.edu has been replaced by new-site.example.edu. Please update your bookmarks accordingly. You will be redirected to the new address in 10 seconds. Please click here to go to the new address now.
}
}
} - ElvisS
Nimbostratus
With the help of F5 support I have the following which does throw up the temp page and redirects but the full path is not maintained and that's what the user's want...
when HTTP_REQUEST {
if {[HTTP::host] equals {test-site.example.edu}} {
HTTP::respond 200 content {
The address you are attempting to reach is outdated. test-site.example.edu has been replaced by new-site.example.edu. Please update your bookmarks accordingly. You will be redirected to the new address in 10 seconds. Please click here to go to the new address now.
}
}
} - ElvisS
Nimbostratus
With the help of F5 support I have the following which does throw up the temp page and redirects but the full path is not maintained and that's what the user's want...
when HTTP_REQUEST {
if {[HTTP::host] equals {test-site.example.edu}} {
HTTP::respond 200 content {
The address you are attempting to reach is outdated. test-site.example.edu has been replaced by new-site.example.edu. Please update your bookmarks accordingly. You will be redirected to the new address in 10 seconds. Please click here to go to the new address now.
}
}
}
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