Best way to protect website application code

Posted by Gaz_Edge on Programmers See other posts from Programmers or by Gaz_Edge
Published on 2012-12-12T14:04:23Z Indexed on 2012/12/12 17:18 UTC
Read the original article Hit count: 214

Background

I have a web application that I host on my own server. I have clients who use the application as is, but some have asked if they can host the application on their own server. This enables them to have their own URLS rather than mine. The application only forms part of their website so I'm assuming it will not be possible for my server to respond to a direct call to their domain etc

To give some examples, i currently have urls like www.mydomain.com/profile, www.mydomain.com/index.php?option=someoption&view=someview&id=1 What my clients' want is www.theirdomian.com/profile, www.theirdomian.com/index.php?option=someoption&view=someview&id=1 etc

Question

My question is, what is the best way for me to allow them to use their own URLs with my application, without giving them all the backend source code and databases to install on their server?

One way I thought would be to create a router.php file that sits on their server. The router then asks my server to output the html. The router modifies all the links etc in the html source and outputs the new html through the clients server. When a link is clicked on the clients site, the router receives the request and modifies the url to get the data from my server etc.

Is this an effective way to achieve what I want, or is it way off the mark.

© Programmers or respective owner

Related posts about web-development

Related posts about web-applications