Jump to content
Welcome to our new Citrix community!

URL transformation for FQDN, Path and port


Recommended Posts

Hello peole!

 

So, we have a situation were an application was developed with one specific FQDN and path but for some reasons those can't be exposed to clients, instead they point to a different fqdn, path and port. We intend to use netscaler to do that transformation.  Here's the flow:

 

Clients points to:       https://externalfqdn:8443/dir/api/[ID-number]/login

Server expects:          https://internalfqdn/abc/xyx/api/[ID-number]/login

 

I set up a URL transform policy (not regex but fixed strings) and it works as intended for fqdn and path, but not for the port, the ":8443" remains.

 

So, result was:          https://internalfqdn:8443/abc/xyz/api/[ID-number]/login

 

Is there any way to change the port as well?

 

Also, since I'm not using rexeg, I'm worried that other subsequent requests thay may point to other directories after "/login" may not work, also for IDs that will be changing all the time. I tried using the (.*) and $1 sintaxys but it didn't work as intended. The policy was like:

 

URL from:              https://externalfqdn:8443/dir/(.*)

URL Into:                https://internalfqdn/abc/xyx/$1

The result was:    https://internalfqdn/abc/xyx/(.*)  - It appended the literal "(.*)" at the end.

 

Am I using those tags wrong?

 

I´m looking forward to your kind suggestions.

 

Link to comment
Share on other sites

1 minute ago, Carl Stalhood1709151912 said:

The vServer listens on port 8443. The service group containing the servers can be port 443. Does that work?

 

Hi Carl!

That´s exactly how it is set up, vserver listening on 8443 and service set to 443. I see in a network trace that the transformed packet is being sent to tcp port 443 to the server, but the Host header keeps the ":8443"

Link to comment
Share on other sites

  • 2 weeks later...
On 12/14/2023 at 5:19 PM, Felipe Ruiz1709162764 said:

 

Hi Carl!

That´s exactly how it is set up, vserver listening on 8443 and service set to 443. I see in a network trace that the transformed packet is being sent to tcp port 443 to the server, but the Host header keeps the ":8443"

Oh. That's a very different piece of cake. The server header is not affected by the UR-transformation policy at all.

I'd create a rewrite policy deleting the server header and a second one adding a new server header.
 

  • Like 1
Link to comment
Share on other sites

On 12/28/2023 at 7:11 AM, Johannes Norz said:

Oh. That's a very different piece of cake. The server header is not affected by the UR-transformation policy at all.

I'd create a rewrite policy deleting the server header and a second one adding a new server header.
 

 

Yep, that's what I ended up doing, I created a rewrite policy with a "replace" action to change the host header in the requests, and now it works as intended.

 

On the other hand, about the regex for URL transform, I was using them wrong since I was typing de full web address. After removing the "https://" it worked just fine.

 

 

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...