Context: I have little/no experience with Netscaler and I'm just starting to use them. One of the first jobs I've been given to work with it is what I thought would be a simple one. I have to have the URL http://www.example.com/subdomain/foo/bar redirected to http://subdomain.example.com/foo/bar. I'm hoping a Netscaler pro will just bat this one out of the park.
Here's what I have so far:
add rewrite action RW_TEST replace "HTTP.REQ.URL.QUERY.NAME_VALUE(\"www.example.com/subdomain\")" "\"subdomain.example.com\"" -comment "Test redirect" add rewrite policy RW_POL_TEST "HTTP.REQ.URL.CONTAINS(\"www.example.com/subdomain\")" RW_TEST
The /foo/bar bit should remain untouched as part of the original request and eventual destination - I just want the subdomain bit rewriting. If the above looks good, please suggest that it does or suggest improvements. I hope it's clear.
My understanding is that this then needs binding to a vserver, which seems to be the easier bit!