We have an ASP.NET MVC 5 site with Angular 1.x front end and a web API interface. There are mobile client apps connecting to this site using the web APIs. Currently this site is tied to the domain https://www.example.com. Our site is hosted on Azure.

However we have another sales site in word press that we would like to use the www.example.com domain. We would like to move the application site to a subdomain like https://app.example.com.

I am wondering if this is achievable with Url / Domain forwarding? Both the domain and sub-domain are in HTTPS.

We have many web requests made to the current domain like:

https://www.example.com/tour/

https://www.example.com/API/customers/

https://www.example.com/payment/register?id=

Our site also has a few angular apps (These are local angular routes):

https://www.example.com/app1#

https://www.example.com/app2#/feature?id=

https://www.example.com/app3#/…/…..

Redirect all of the above to:

https://app.example.com/tour/

https://app.example.com/API/customers/

https://app.example.com/app1#/

etc.

Redirect these to app.example.com sub-domain.

Most of these requests have OAUTH authentications headers applied and will authentication still work after redirect? The requests are mostly REST API calls, some have URL parameters, some have embedded binary content (POST call), will this pass through the redirect OK?

Has anyone done this before? Whats the best way to achieve this?

Thank you in advance.

Read more here: Domain Redirect / Forwarding with HTTPS for Web API and Angular


Solution:

If you know the solution of this issue, please leave us a reply in Comment section, to update the question.


Wordpress related questions and answers: