Forum Discussion
Wes_98712
Nimbostratus
Mar 14, 2007ReWrite HTTP Post
This is a very general question, searching through the forums I have seen some postings regarding rewriting HTTP posts, versus Gets. We have an interesting situation where we are rewriting URL request...
Wes_98712
Nimbostratus
Mar 15, 2007Perhaps something like this?
when HTTP_REQUEST {
set my_uri [HTTP::uri]
set my_host [HTTP::host]
set my_query [HTTP::query]
if { [ matchclass $my_uri contains $::gms_splitout_reports_perf2_class] } {
if { $my_uri starts_with "/dbauth/plsql" } {
set my_new_path [string map {"dbauth/plsql" "dbauth/rpt"} $my_uri]
log local0. "SWITCHING: http://$my_host$my_new_path"
log local0. "URI Query: $my_query"
HTTP::uri $my_new_path
} else {
log local0. "URL: http://$my_host$my_uri"
pool gms_app_qa_perf_temp_pool
}
} else { if { $my_uri starts_with "/dbauth/rpt" } {
set my_new_path [string map {"dbauth/rpt" "dbauth/plsql"} $my_uri]
HTTP::uri $my_new_path
} else {
pool gms_app_qa_perf_temp_pool
}
}
}I believe this will reset the URI to what I want it to be before I send it back to the pool for servicing, correct me if I am wrong here.
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