Forum Discussion
Frank_Ziebarth_
Nimbostratus
Jun 16, 2006rewrite an URI with a request parameter
Hallo
we have two webservices in the development, so the the uri is change very often.
Our end-user should connect to these server to an easy URI
http://server/portal/
http:/...
Terje_Gravvold
Nimbostratus
Jun 16, 2006Hi,
I think your mistake may be that you replace the whole URI with a constant (/version04.webservices.info/). Everything in the URI will be replaced by this. Try to insert a log sentence and explore what happens.
You can solve this with a regsub command or the like. I don't garante the syntax but I hope you get the idea :-).
Example
when HTTP_REQUEST {
if {[HTTP::uri] starts_with "/portal/"} {
log local0. "Original HTTP uri = [HTTP::uri]"
set [HTTP::uri] [regsub -all ^/portal [HTTP::uri] "/version02.webservices.portal"]
log local0. "New HTTP uri = [HTTP::uri]"
use pool SDS_Pool01
}
}
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
