Forum Discussion
Bill_Stromatos_
Nimbostratus
Sep 21, 2009Rewrite Question
I am trying to figure out the whole TCL thing, I am attempting to do an http redirect. I have a user that whats to use a simpler string to query our service desk application.
Incoming request is http://change.corp.intranet/c1111
Here is the TCL script I have now.
when HTTP_REQUEST {
HTTP::redirect "https://servicedesk.corp.intranet/CAisd/pdmweb.exe?OP=SEARCH+FACTORY=chg+SKIPLIST=1+QBE.EQ.chg_ref_num=[HTTP::uri]"
}
What I am seeing is an extra \ being added just before the [HTTP::uri] so it looks like this in the system.
https://servicedesk.corp.intranet/CAisd/pdmweb.exe?OP=SEARCH+FACTORY=chg+SKIPLIST=1+QBE.EQ.chg_ref_num=/c1111
What can I do to eliminate the extra / from being added to the redirect?
Thanks!
- The_Bhattman
Nimbostratus
You can write it up aswhen HTTP_REQUEST { if {[HTTP::host] eq "change.corp.intranet" } { http::redirect "https://servicedesk.corp.intranet/CAisd/pdmweb.exe?OP=SEARCH+FACTORY=chg+SKIPLIST=1+QBE.EQ.chg_ref_num=[URI::basename [HTTP::uri]]" } }
- Bill_Stromatos_
Nimbostratus
Thanks CB, that did the trick. - Bill_Stromatos_
Nimbostratus
Thanks CB, that did the trick.
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