Ethan_West_1101
May 01, 2008Historic F5 Account
301 to Redirect
Hi All,
I am trying to get an iRule working that will redirect on a 301 to the Specific Host URI requested. This is for an application that users request is without the trailing slash (http://www.somesite.com/stcokquotes) in turn the servers respond with 301.
My question how do I write the iRule to respond with a 302 for example and preserve the Host and URI? I am looking at a previous post that works for me but is inserting the Header Value Location from the server which obviously breaks the app. How do I preserve the Host / URI in the inital request.
when HTTP_RESPONSE {
Check if the server response is a 302
if {[HTTP::status] == 301}{
Send a 301 response to the client with the Location header value from the server's response HTTP::respond 302 Location [HTTP::header value Location]
}
}
Thanks for the help in advance.