Re: Not the root problem
Exposing your source code shouldn't be an issue, because your code should survive inspection.
When your server-side source code is exposed to the end user, and that source code contains the business logic for how you operation runs, can you see how that might possibly be advantageous to your competitors?
A website should be nothing more than a presentation layer (with some validation to avoid having to pass too much rubbish back to the server). Business logic should live between the presentation layer and storage layer. More layers may be required (to handle things such as filtering, blacklisting, whitelisting, throttling, etc. etc.) There are many reasons for doing things this way, and even more books written about it telling you why.