- We have a php app located at www.example.com/go
- We have a vhost and subdomain at go.example.com that points to www.example.com/go
- One of the app resources is /api - this can be called at go.example.com/api with some extra uri segments. Examples: go.example.com/api/reports and go.example.com/api/contacts
- All of the above works 100%
What we would now like to achieve is to instead have 'api' as a subdomain. So, instead of the api root being go.example.com/api, we'd like this to be api.example.com.
1. Do we have to get api.example.com to rewrite to go.example.com/api, or to www.example.com/go/api?
2. What .htaccess rules do we need to set up?
3. Do we need to set up a vhost for api.example.com? If yes, where does this vhost need to point to?
Thanks for any advice you can give.