VMware Networking Community
chrisgnoon
Enthusiast
Enthusiast
Jump to solution

NSX-v Application Rules

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:

https://docs.vmware.com/en/VMware-NSX-Data-Center-for-vSphere/6.2/com.vmware.nsx.admin.doc/GUID-A577...

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.

Chris Noon | CCDP | CCNP | VCDX 289
Don't forget to mark as solved if your questions are answered.
Reply
0 Kudos
1 Solution

Accepted Solutions
Sreec
VMware Employee
VMware Employee
Jump to solution

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.

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 7x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered

View solution in original post

4 Replies
Sreec
VMware Employee
VMware Employee
Jump to solution

I believe you should try below configuration for URL based redirection.

pastedImage_0.png

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 7x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
Reply
0 Kudos
chrisgnoon
Enthusiast
Enthusiast
Jump to solution

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.

Chris Noon | CCDP | CCNP | VCDX 289
Don't forget to mark as solved if your questions are answered.
Reply
0 Kudos
Sreec
VMware Employee
VMware Employee
Jump to solution

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.

Cheers,
Sree | VCIX-5X| VCAP-5X| VExpert 7x|Cisco Certified Specialist
Please KUDO helpful posts and mark the thread as solved if answered
chrisgnoon
Enthusiast
Enthusiast
Jump to solution

Perfect.  I love that solution and that's what I will do.

Thank you.

Chris Noon | CCDP | CCNP | VCDX 289
Don't forget to mark as solved if your questions are answered.
Reply
0 Kudos