Will try to explain my problem as accurately as possible.
So, I have a website. In this separate structure, BackEnd and FrontEnd
For the FrontEnd separate server for the backend is also a separate, let's call them conditionally front.domain.com and back.domain.com. Here I say, I may not correctly divide the Front and Back, with a cross-server structure I'm working for the first time, this possible error is allowed in the "Foundation" of the project.
To check, right?
1. On the server ForntEnd - drawing the pages, but not by the means of JS and PHP. Why - please stipulate below, it is perhaps not true
2. On the server BackEnd to retrieve data from the selected functions, e.g. obtaining the count of subscribers
3. After going to the link: for example domain.com/catalog loaded the page, all dynamic values inserted there by means of PHP, then the transition through the pages of the website just loads the content into the block, so with all the links.
Finally, the question itself
In fact, it would be all on 1 server, ie, BackEnd and FrontEnd - I could file catalog.php just plug the file API of the website require("api.php"). But I like this, I want on different servers ForntEnd and BackEnd. Okay, from the position you can go to write all API code in the ForntEnd, but what is it then ForntEnd if he pulls data from database)) because Of this, I questioned whether I share these two components.
I know that the front is roughly what is processed on the client. I can do everything in JS, but then how to do redirections without reloading the page? at the same time, to remain still and dynamic resource reference