Rewrite policy fail to honored when binding to NetScaler Gateway Virtual Server
book
Article ID: CTX465117
calendar_today
Updated On:
Description
When you're trying to insert some prompts to NetScaler Gateway logon page via Rewrite policy, you may find the prompts strings are not displayed even if you refresh the web page or clear all browser cache. The Rewrite policy is not honored as expected.
Environment
This software application is provided to you as is with no representations, warranties or conditions of any kind. You may use and distribute it at your own risk. CITRIX DISCLAIMS ALL WARRANTIES WHATSOEVER, EXPRESS, IMPLIED, WRITTEN, ORAL OR STATUTORY, INCLUDING WITHOUT LIMITATION WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NONINFRINGEMENT. Without limiting the generality of the foregoing, you acknowledge and agree that: (a) the software application may exhibit errors, design flaws or other problems, possibly resulting in loss of data or damage to property; (b) it may not be possible to make the software application fully functional; and (c) Citrix may, without notice or liability to you, cease to make available the current version and/or any future versions of the software application. In no event should the software application be used to support ultra-hazardous activities, including but not limited to life support or blasting activities. NEITHER CITRIX NOR ITS AFFILIATES OR AGENTS WILL BE LIABLE, UNDER BREACH OF CONTRACT OR ANY OTHER THEORY OF LIABILITY, FOR ANY DAMAGES WHATSOEVER ARISING FROM USE OF THE SOFTWARE APPLICATION, INCLUDING WITHOUT LIMITATION DIRECT, SPECIAL, INCIDENTAL, PUNITIVE, CONSEQUENTIAL OR OTHER DAMAGES, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. You agree to indemnify and defend Citrix against any and all claims arising from your use, modification or distribution of the software application.
Resolution
You have several ways to address this issue:
Solution 1: Flush NetScaler cache in NetScaler CLI with below command:
>flush cache contentGroup loginstaticobjectsSolution 2:
If you are unable to flush NetScaler cache via GUI or CLI because of standard license, you may flush all build-in NetScaler cache via NetScaler SHELL command below:
#nsapimgr_wr.sh -ys call=ns_ic_flushYou could disable build-in NetScaler cache function via NetScaler CLI command below:
>set aaa parameter -enableStaticPageCaching NOSolution 3:
Reboot NetScaler appliance to have all cache cleared.
Problem Cause
The modified content hits NetScaler's internal cache due to the rewrite policy. NetScaler serves the response from the cache, preventing the rewrite policy from taking effect.
As we can see cache hits are handled earlier than rewrite policy action in NetScaler.

NetScaler Packet Process flow reference
Was this article helpful?
thumb_up
Yes
thumb_down
No