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, 2007I don't think we have a multipart message issue, but not sure, here is the current iRule:
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::redirect "http://$my_host$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::redirect "http://$my_host$my_new_path"
} else {
pool gms_app_qa_perf_temp_pool
}
}
}I'm wondering if I can replace the HTTP::redirect part with something else that simply replaces the strings I am looking for. Not sure if setting the location is better or what, I am trying to search through the forums, and as usual the search engine here is flakey with the new devcentral release.
Thoughts?
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