recently a friend of mine showed me a webpage that he made and uploaded it in his hosting but it was connected to someone else’s domain, for example, facebook.com/xyz.php I was shocked to see this and he said that he can do this with any website Can this be done and if yes then how?
If you get access to update the dns records of the domain, you can update the record values to point the domain name to any server.
Then, you can place your websites in that server. so that, your website will come up under that domain.
If you don’t have access to dns records of the domain,
you cannot do it but you can work it out like a trick but it isnt a complete solution.
That trick works in a way like, you have to update your dns zones and rules in your local system or local router or local network to make the target domain point to the server you specified instead of connecting to the original server.
Its more like some proxy network. This works only with the system or network where you modified the dns zones.