VMware Networking Community
durby
Contributor
Contributor

NSX-T 3.1 Rewrite Url

I have create a NSX Load-Balancer and create a virtual Server with a redirect to a specific url. This works great so far....

For example:

http://srv01xyz.com will redirect to https://srv02xyz.com

My question is how can i rewrite the uri so that i still get the original requested url in my browser? 

For now i got the url for srv02.xyz.com but i want to rewrite to the origin url srv01xyz.com

Do i have to add another rule? I tried already differend rule settings but nothing worked for me.

 

 

0 Kudos
3 Replies
p0wertje
Hot Shot
Hot Shot

Hi,

 

Please be aware that the Native NSX load balancer is deprecated.

I do not completely understand what you want to achieve. Is it just a rewrite from http to https ?

Cheers,
p0wertje | VCIX6-NV | JNCIS-ENT | vExpert
Please kudo helpful posts and mark the thread as solved if solved
0 Kudos
durby
Contributor
Contributor

No not just http -> https...

In nginx i realized this with a reverse_proxy and proxy_pass.

My goal is, that the url stays the origin url and does not switch to the redirected url.

Now the behaviour in brower is:

http://srv01xyz.com (origin url)

redirect to:

https://srv02xyz.com (destination url)

but in my browser address bar i get the destination url. It should stay the origin url

For expample

http://srv01xyz.com/example should redirect to https://srv02xyz.com/example but in the adress bar it should stay at https://srv01xyz.com/example

I hope this will be clear now.

Thank you.

 

0 Kudos
p0wertje
Hot Shot
Hot Shot

Hi

Not sure if nsx lb has an option of 'proxy_pass' as nginx has.
What you could do:
Normally what you can do is select a pool when you go to a specific URI
i.e http://www.example.com/site1 -> pool 1 (with i.e a webserver serving this site1)
And http://www.example.com/site2 -> pool 2 (with webserver service site2)

The URL will stay the same, but the backend will be different.

Cheers,
p0wertje | VCIX6-NV | JNCIS-ENT | vExpert
Please kudo helpful posts and mark the thread as solved if solved
0 Kudos