I’m currently building a simple web application in PHP that other company’s can use as one of their services. I want to host the application myself and not install it on one of their servers, but i do want the accessibility that that would offer. Example:
http://www.mywebapp.com is where i would host the web application.
http://www.company.com would be the domain name of the client.
webapp.company.com should redirect to http://www.mywebapp.com/?c=company. Upon navigation, webapp.company.com/view.php?v=test would also be redirected to http://www.mywebapp.com/view.php?c=company&v=test and so on upon further using the web app.
Can someone explain how i can achieve this and if this is the best option considering my requirements?
I recommend that you switch to implementing an API. That’s how this problem is solved by many corporations. They simply have an API key that will let your server know what client they are and therefore what to serve them.
Resources on API’s:
I think your idea IS possible if both servers are set up correctly, but doesn’t it feel wrong to you?