Forum Discussion
SteveEason_3059
Nimbostratus
Feb 01, 2019Forwarding to external URL while keeping variables/folders
So we have a situation where our marketing team needs to create various tracking items for our websites and they don't have the know how or access needed to do this on our F5. In the past we've used...
Stephane_Viau
Nimbostratus
Feb 04, 2019Hi Steve,
I think you would be looking at something like that, although I am not completely certain because I am not sure that I fully understand your post :
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"shorturl.com" {
HTTP::respond 301 Location http://www.shorturl.com[HTTP::uri]
}
"www.shorturl.com" {
HTTP::respond 301 Location http://hubspotcustomer.a4029.hubspot.com[HTTP::uri]
}
}
}
So if someone came in using shorturl.com/client1, he/she would be redirected to , and then the next request coming in for would get redirected to http://hubspotcustomer.a4029.hubspot.com/client1. The query string would follow as well if you have one as [HTTP::uri] contains both path and query string.
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
