Forum Discussion
Shailaja_V_3165
Nimbostratus
May 15, 2017Irule redirect without changing the original URL
Hello, I have a requirement to write a irule to redirect from one URL to another however the client should be able to see original URL only.
Example :
should be redirected to
When client...
Stanislas_Piro2
Cumulonimbus
May 17, 2017Hi,
A little explanation about commands:
when a user access URL http://www.123.com/browse.def?user=titi the real HTTP request is:
GET /browse.def?user=titi HTTP/1.1
Host: www.123.com
User-Agent: myuseragent
Some other headers: headers values
Then, the following commands return this :
- HTTP::path : /browse.def
- HTTP::uri : /browse.def?user=titi
- HTTP::query : user=titi
- HTTP::host :
You can try the following code to change hostname:
when HTTP_REQUEST {
if { [HTTP::host] equals "www.123.com" } {
HTTP::host "www.abc.com"
}
}
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
