Redirect Web Interface on Citrix NetScaler with Rewrite function

When you install and configure Web Interface on Citrix NetScaler nCore you probably notice that there is no option to automatically go to the default Citrix XenApp page as you were used to in a Microsoft IIS install of the Citrix Web Interface. Once you have set up Citrix Web Interface and you add the newly created address in the browser you will get an “Invalid Path” notice. This would mean you (or your users) always would have to fill in the subdirs also.

http://hlouwers.files.wordpress.com/2010/11/image4.png?w=630

Off course this can be nicely resolved with a Rewrite function within the Citrix NetScaler and here I will show you how to.

Command line version:

add rewrite action rw_ac_xenapp replace HTTP.REQ.URL "\"/Citrix/XenApp\""

add rewrite policy rw_pol_xenapp "HTTP.REQ.URL.EQ(\"/\")" rw_ac_xenapp

bind lb vserver 10.13.14.21_80 -policyName rw_pol_xenapp -priority 100 -gotoPriorityExpression END -type REQUEST

GUI Version:

Go to Rewrite –> Actions and click Add. Create the Action as in the screenshot below:

http://hlouwers.files.wordpress.com/2010/11/image5.png?w=440&h=480

Click OK and go to Rewrite –> Policies. Create the Policy as in the screenshot below:

http://hlouwers.files.wordpress.com/2010/11/image6.png?w=500&h=308

And the last step. Bind the newly created policy to the Web Interface Virtual Server:

http://hlouwers.files.wordpress.com/2010/11/image7.png?w=600&h=547

Start a browser and visit the Web Interface address. There u go. Could not redirect faster then that you guys!

About Henny Louwers
I work as a Consultant specialized in Application Delivery, Virtualization of Servers, Desktops and Apps.

11 Responses to Redirect Web Interface on Citrix NetScaler with Rewrite function

  1. ns_dummy says:

    Great post. I’m facing the same problem. What about having an home page displayed where to let user choose different Web Interface Sites? Is it worth using the rewrite to replace that page with some html code?

    Thanks.

    • Yes, that would be possible, but you will have to know where that you want NetScaler to react on, originating IP, host header, etc.

      You could also create 2 DNS entries, one for each site and then create a rewrite function for every incoming DNS address to change to the specific Web Interface when it comes in.

  2. astrashnikov says:

    Hello Henry. I found your site today. Maybe you can help me to find solution for my netscaler VPX installation. I try to install AGEE and xenapp service site on Netscaler VPX, version is NS9.2: Build 48.6015.e.nc. Now I have one Virtual AG server with turn off authenticarion and xenapp service site in gateway direct mode. It works fine, but I can’t use the single sign on for xenapp service site. I Also set “WIAuthenticationMethods=SingleSignOn” in the WebInterface.conf file, but i doesn’t help in the gateway direct mode. Also I have installed another Xenapp Service Site by direct mode and when I set “WIAuthenticationMethods=SingleSignOn” the Single Sign On work. Do you know Is it possible to use Single Sign on the xenapp service site and AGEE on the Netscaler Vpx Appliance with gateway direct mode?

    • I have had the exact same problem. You probably would like to create a Citrix XenApp Services to use with AGEE and Citrix Receiver for iPad/iPhone/etc.

      Seems that Citrix XenApp Services site passthrough (or SSO) authentication does not yet work within the Citrix Web interface for NetScaler. Now, I’m not sure about the most recent builds.

      The only workaround I know is to still use Windows Citrix Web interface Servers in the backend for use with Citrix Receiver.

      If you can confirm this problem on your site I will try and create a support ticket with Citrix Tech Support.

      • astrashnikov says:

        Hello Henry.
        Thank you very much for your reply. Do you try to set Web interface (Web site) for those functions?
        I’m trying to setup website on the ncore with “Single Sign on”. But I can’t use “Single Sign on” either I use Gateway Direct mode with Authentication at the AGEE or Gateway Direct mode with Authentication at the Web interface. I also Can’t use “Single sign on” in the “direct mode”. When I set “WIAuthenticationMethods=SingleSignOn” I always get Error “Invalid System Configuration”. Do you know any possibility to use “Single sign on” with the Web Site in the Ncore? Where I can setup Authentication on Website if I use direct mode or gateway direct mode (with authentication point in the web interface)? Is it possible to use “single sign on” at the gateway direct mode, when authentication point at the AGEE ( use “single sign on” for Authentication at the AGEE)?

  3. Walter says:

    Hey Henry,

    Thanks sir, you are a lifesaver on this! I do have a question though. Do you know how one would go about setting up a redirect from non-secure http://www.yourwebsite.com to secure https://www.yourwebsite.com/Citrix/XenApp

    Thanks in advance!

    Walter

  4. HenryB says:

    Hello,

    After performing the above commands and trying the GUI, I still get the “Invalid Path” when going directly to IP. Thanks in advance..

  5. HenryB says:

    Hello HenryL,

    After a little exploring, I realized that the “rewrite” option was not enabled within “Configure basic features”. Once enabled, it worked like a charm. Thanks again!!!!!

  6. cmsantos says:

    Hi Henny!

    Nice tip in a nice post! Thanks guy!
    :)

    Kind regards,

    Cristiano Santos

  7. Ilya Fedotov says:

    It works,
    Thanks!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Connecting to %s

Follow

Get every new post delivered to your Inbox.

Join 198 other followers