Jump to content
Welcome to our new Citrix community!

Netscaler Gateway 12.0 - Rewrite Policy Cached


Recommended Posts

Hi

 

I have been implementing a re-write policy to add a custom footer to a Virtual Server Gateway login page. I have been using the following guide:
 

https://support.citrix.com/article/CTX215817

 

Whilst I have been able to successfully get the message to display, any amendments/changes to it do not display. The re-write is being cached and I do not know where. I have tried multiple different browsers which cache cleared, 2 different PCs and the original footer that I initially set shows. 

I do not have Integrated caching enabled. 

 

Is there a way to clear what ever has cached? Or does anyone know how to stop it happening?

Thanks

Link to comment
Share on other sites

Static caching is enable by default on the NetScaler. The NetScaler caches the NetScaler Gateway page and the page is loaded using the cached objects. This happens even if the Integrated caching is disabled on the NetScaler.
Once the NetScaler is rebooted or failed-over it loads and caches again

Link to comment
Share on other sites

1 hour ago, Madhur Walia said:

Static caching is enable by default on the NetScaler. The NetScaler caches the NetScaler Gateway page and the page is loaded using the cached objects. This happens even if the Integrated caching is disabled on the NetScaler.
Once the NetScaler is rebooted or failed-over it loads and caches again

 

Hi

 

Thanks for the response. Are there any commands that possibly flush the cache from the CLI without the need for a reboot or failover?

Link to comment
Share on other sites

  • 3 months later...

I've had the same problem. Please read the CTX215817 thoroughly: 

 

"Notes: The change might not take effect straightaway since Apache server might send 304 (Not modified), instead of a 200 OK to the client for this file and hence the rewrite action would not take effect. If that happens, then edit the vpn/gateway_login_view.js file. You need not make any changes, just adding a space anywhere in the file and saving it would do the trick."

 

It did the trick in my case.

Link to comment
Share on other sites

  • 2 years later...

We have also seen this issue.
And suddenly it happend again without rebooting.
We have a theory that the issue in our setup has to do with the following.

We have 2 Citrix gateways, one is external with rewrites to remove Password 2 field, as the external VS has Secondary Authentication configured.
The other citrix gateway is internal only and does not have Secondary Authentication configured.
However, we had both Citrix Gateways configured to the exact same Portal Theme, a copy of the X1 theme where only the logo is changed.
Our theory is that the Portal Theme static files are cached and shared between both citrix gateways.

So if the "gateway_login_form_view.js" file was renewed in cache from an internal request, the rewrites did not apply, resulting in the external requests would not have the rewrites applied anymore, as it is serving from the cached copy without the rewrites.

 

We have now made an extra Portal Theme copy of X1 and appended "_External" to the name and only attached it to the External citrix gateway.
Instantly this worked, we now receive different content from "gateway_login_form_view.js", when accessing internal and external.

 

Edit notes from here
(at the time of writing this post, we used build-13.0-67.39_nc_64)

 

Note1

If using single FQDN for both internal and external gateways, then client browser cache is also a problem if rewrites only happens on one of the gateways, so we had to add the rewrites for both gateways, to ensure "gateway_login_form_view.js" is identical whether a client request the file internally or externally.

 

Note2

We are using X1_Internal and X1_External Portal Themes, which are both created from the X1 template.
As much as we wanted my initial conclusion to be true, it sadly is not.
Before adding same rewrites to the Internal gateway, we saw the rewirtes applied in "gateway_login_form_view.js", when requested from the internal gateway.

So either the js/static files cached in netscaler are used by all Portal Themes or group cached for all Portal Themes based on the same template.
Last option is that this is a bug, and that static files cached should never be allowed to be linked to different gateways

 

Note3

If none of our caching theories above are true, then the very last option is that the rewrites sometimes fail, when static files are renewed in the cache.
We have yet to see the rewrites missing, since adding the same rewrite policies to both internal and external gateways.

But we fear adding new gateways for other purposes, where the rewrites might have to be totally different, as this could re-introduce content variation of the cached "gateway_login_form_view.js" file once again.

 

Edited by mleemin131
There is more to it, regarding caching of static files.
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...