Forum Discussion
Domel_163525
Nimbostratus
Sep 04, 2015Rewrite URL
Hello guys,
We have a very basic VS configured on our BIGIP which recognize a URL the HTTP request comes from and redirects the requests to the appropriate Pool members. The VS also does the SSL...
Stanislas_Piro2
Cumulonimbus
Sep 05, 2015Hi,
I read the article you provide and there is no information that full URL is rewritten but the Full URI
I tried the following policy:
ltm policy Pol_Pool1 {
controls { forwarding }
requires { http }
rules {
uri-replace {
actions {
0 {
forward
select
pool Pool-c-8080
}
1 {
http-uri
replace
value https://newwebservice/Custom/Uri
}
}
ordinal 1
}
}
strategy first-match
}
and the request sent to the server was:
GET https://newwebservice/Custom/Uri HTTP/1.1
Host: 192.168.155.110
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:40.0) Gecko/20100101 Firefox/40.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: fr,fr-FR;q=0.8,en-US;q=0.5,en;q=0.3
Accept-Encoding: gzip, deflate
Connection: keep-alive
So http-uri replace value rewrite only URI and not URL... the policy must be:
ltm policy Pol_Pool1 {
controls { forwarding }
requires { http }
rules {
uri-replace {
actions {
0 {
forward
select
pool Pool-c-8080
}
1 {
http-uri
replace
value /Custom/Uri
}
2 {
http-host
replace
value newwebservice
}
}
ordinal 1
}
}
strategy first-match
}
For the web service, I recommend to define one URI for it and add a condition like:
conditions {
0 {
http-uri
path
values { /webservice.php }
}
}
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