It is necessary to render one site in the other’s i-frame, and to try to access the iframe site directly in the browser, redirect to the site with an iframe or, for example, throw out a 403 error.

    1 answer 1

    if (window == window.top) window.location = "http://..."; 
    • If the client has js disabled in the browser? It is necessary that, in any case, it works in the iframe and is not otherwise shown. - John Roget
    • @JohnRoget Then you are out of luck. - Igor