Forum Discussion
spalande
Nacreous
Jul 14, 2021You can try below.
when HTTP_REQUEST {
if { ([string tolower [HTTP::uri]] starts_with "/ecmlivelink/llisapi.dll/open") and ([active_members livelink_qut_tcp_8100_pool] == 0) } {
set doc_id [string range [HTTP::uri] 30 end]
HTTP::respond 301 Location "http://csintqut.network.qut:81/fsl/Redirect.aspx?docid=$doc_id"
return
}
}
- DifanZJul 15, 2021
Cirrus
Thanks Sanjay. The length might be dynamic and there could be at least a slash at the end of the link.. I actually opened a case and I am provided with a regular expression code like this
regexp "/open/(\[0-9\]+" $uri something doc_id
This successfully got me the number, regardless of the pending characters. But thanks anyway for your help!