Forum Discussion
VernonWells
Aug 03, 2015Employee
when HTTP_REQEUST {
set guid [findstr [HTTP::query] "docid=" 6 &]
if { $guid ne "" } {
HTTP::redirect "http://host.example.com/en/server/$guid"
}
}
Naturally you should substitute an appropriate name for "host.example.com". This will not redirect if the docid query parameter is not found, and it makes no effort to validate the GUID.
- jmartinez_44554Aug 03, 2015NimbostratusThanks for the reply. I'm getting this error when trying to save the rule. 01070151:3: Rule [/Common/livelibrarytest_redirects] error: /Common/livelibrarytest_redirects:1: error: [unknown event (HTTP_REQEUST)][when HTTP_REQEUST { set guid [findstr [HTTP::query] "docid=" 6 &] if { $guid ne "" } { HTTP::redirect "http://host.example.com/en/server/$guid" } }]