Forum Discussion
dmbake88_23490
Nimbostratus
Jan 11, 2008http redirect irule
I'm looking to write an irule (unless there is another way to do this with the f5) to redirect an http request coming into a vip. The uri is a little long for the customer and it would be easier on them to use a short uri and then have the f5 add characters or redirect them to a different uri. This probably be done at the server level as well and save me the trouble but I'm still interested on how it is implemented. Below is part of an example I found on this site but I have added more to the uri. I have never configured an irule before so I am unfamiliar with the context. Also, what is the meaning of the '3'? Thanks in advance.
when HTTP_RESPONSE {
if { [HTTP::status] starts_with "3" } {
HTTP::header replace Location [string map -nocase {myold.hostname.com mynew.hostname.com} [HTTP::header Host]]
}
}
3 Replies
- dmbake88_23490
Nimbostratus
sorry, the updated uri. as you can see all we are trying to accomplish is adding characters to the uri - i guess this can be considered a redirect. - Deb_Allen_18Historic F5 Account(moved to iRules 9.x forum)
- Michael_Yates
Nimbostratus
Try this one. We use it to make the URL more "User Friendly".
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