I recently had a very frustrating issues with Access Gateway Enterprise where, after the logon, it would continually redirect to /cgi/login.
This /cgi/login page would display a HTTP 500 Internal Server Error 500 as below
and then if I hit refresh I would get a HTTP 403 forbidden: The website declined to show this page as below
I checked my config about a hundred times and could not find a solution. I logged it with Citrix and they could not find a solution. In the end I restored an old config and it solved the issue.
The only way I know how to recreate this at the moment is to turn on ICA Proxy in the Global Settings but don’t specify a Web Interface address in the Global Settings and then unbind your session policy from the Access Gateway Virtual Server.
But this was definitely not what was causing it the first time I had this issue. So I am posting this in the hope that someone else find it and can shed some more light on this issue.