Forum Discussion
Scott_85950
Nov 13, 2010Nimbostratus
Root Domain Redirect Retaining Query String
Hi, I am looking to redirect, hopefully 301 redirect, from the default domain when called to a new home page location while retaining any appended query in the original URI. I have the following i...
Scott_85950
Nov 13, 2010Nimbostratus
Thank you, this works great. I am going to slightly modify with the following for a 301 redirect. As well, thank you for the information on the limitation of the URI:path prefix in SOL9952. I believe for our application of this iRule, I don't foresee this as a problem, but will test to be sure.
when HTTP_REQUEST {
if { [URI::path [HTTP::path]] eq "/" and [HTTP::query] ne ""} {
HTTP::respond 301 "Location" "http://[HTTP::host]/guest/en/home.shtml?[HTTP::query]"
}
}
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