Forum Discussion
Davean_Hosang_1
Nimbostratus
Sep 11, 2012Redirect host and path but keep query string on redirect
I need to redirect a request to a new host and path but keep the query string the same. Can someone help me with the best way of doing this?
If request contains “https://olddomain.com/SelfServ/W...
Michael_Yates
Nimbostratus
Sep 12, 2012Hi Davean,
You can use the [HTTP::query] command to have it added onto the end.
NOTE: The HTTP::query value does not include the "?".
Try this:
when HTTP_REQUEST {
if { [string tolower [HTTP::path]] equals "/selfserv/webcontactresponse.aspx" } {
HTTP::redirect "https://new-domain.com/my-account/web-contact-response.aspx?[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