Forum Discussion

Ski_Kacoroski_2's avatar
Ski_Kacoroski_2
Icon for Nimbostratus rankNimbostratus
Jan 30, 2018

LTM Policy to rewrite URI '/' only on logon

I have a irule like this that works:

 

when HTTP_REQUEST { if { [string tolower [HTTP::host]] equals "timecard.nsd.org" } { if { [HTTP::uri] equals "/" } { set uri [string map -nocase {"/" "/wfc/applications/wtk/html/ess/logon.jsp"} [HTTP::uri]] HTTP::uri $uri } } }

 

That I am trying to put into a policy with this policy rule: timecardv8_prule { actions { 0 { log write facility local0 message "tcl:Start - [HTTP::uri]" priority info } 1 { http-uri replace value /wfc/applications/wtk/html/ess/logon.jsp } ...

 

My problem is that when I try to use the Replace HTTP:uri selection, it matches all paths, not just the '/' path. This is what I do not want. I could not find anything in searching the documentation and forums. I am running 12.1.2HF1. Thanks for your help.