Author Topic: How to reference /cvpn/hash in rewrite policy  (Read 452 times)

Offline omicronx9

  • Contributor
  • *
  • Posts: 7
  • Karma: 0
How to reference /cvpn/hash in rewrite policy
« on: January 22, 2012, 06:26:15 PM »
Hello can someone help me I need to rewrite some text in the body of a http response.

I need to know how to reference /cvpn/hash where /cvpn/hash is the masked URL set by the netscaler.  Example: https://mydomain.com/cvpn/DJFldadfadfasdfkasdfasdfadsfasdf/restoftheurl.html

Im note sure if i can use this ? /cvpn/hash/ = VPN.CLIENTLESS_BASEURL.CVPN_ENCODE (PG 79: http://support.citrix.com/servlet/KbServlet/download/23195-102-647795/NS-PolicyConfig-Guide.pdf)

I also need to know how to string match %username% which can be any alphanumeric character

HTTP RESPONSE BODY

ORIGINAL

AAA.sDbUrl=AAA.EuR + 'mail/%username%.nsf';AAA

CHANGE

AAA.sDbUrl=AAA.EuR + 'cvpn/hash/mail/%username%.nsf';AAA

///////////////////////////

I believe the policy  that i will endup with will look something like this except for the string matchnig required above

add rewrite policy rw_pol_Lotus_Domino_login "HTTP.RES.BODY(5000).CONTAINS(\"/AAA.sDbUrl=AAA.EuR + 'mail/%username%.nsf';AAA/\")" rw_act_Lotus_Domino_login

add rewrite action rw_act_Lotus_Domino_login replace_all "http.RES.BODY(50000).SET_TEXT_MODE(ignorecase)" "\"AAA.sDbUrl=AAA.EuR + 'cvpn/hash/mail/%username%.nsf';AAA"\"" -search "text(\"AAA.sDbUrl=AAA.EuR + 'mail/%username%.nsf';AAA\")"

bind lb vserver vpn -policyName rw_pol_Lotus_Domino_login -priority 80 -gotoPriorityExpression END -type RESPONSE

« Last Edit: January 22, 2012, 10:15:19 PM by omicronx9 »