I am trying to create an NSX-v application rule on an Edge Gateway.
I want to redirect https://192.168.200.100 to https://lab-vcloud.local.
I've tried the following from the application rule examples:
acl old_url url https://192.168.200.100
redirect location https://lab-vcloud.local if old_url
But it doesn't work. It seems to work when I redirect URI information (/ to /login for example), not URL information.
Ok got it. How about doing a NAT ?
https://old-vcd.local = Give a different IP here and translate the same to VIP
https://new-vcd.local = 192.168.200.100
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
I believe you should try below configuration for URL based redirection.
Thanks Sreec.
That works similar to the application rule I wrote. The problem is we are using the same Virtual Server to terminate both URLs, so:
https://old-vcd.local = 192.168.200.100
https://new-vcd.local = 192.168.200.100
We are essentially using a new (standarised) URL and we want to push clients from the old one to the new one (URL rewrite, if old, rewrite to new), all be it, terminating at the same endpoint.
In my both mine and your solution, the browser would end up in an infinite loop.
The only solution I can see is to create a second Edge with the old URL and create the redirect to the original Edge with the correct URL.
Ok got it. How about doing a NAT ?
https://old-vcd.local = Give a different IP here and translate the same to VIP
https://new-vcd.local = 192.168.200.100
---------------------------------------------------------------------------------------------------------
Was it helpful? Let us know by completing this short survey here.
Perfect. I love that solution and that's what I will do.
Thank you.