This is what I would like to achieve, but I am a bit of a DNS noob:
1) I have a webapp running on a VPS at myfirstdomain.com/MyApp
2) I want this: going to myapp.myOTHERdomain.com should be heading to myfirstdomain.com/myApp without redirecting using a php script or doing some CURL business. So the url in the addressbar of the browser should stay the same.
Is this possible by doing something with DNS (or some different solution)? I own both domains.
Within DNS, it is not possible to redirect to a subdirectory, but what you can do is create a CNAME record like this:
myapp.myOTHERdomain.com. IN CNAME myfirstdomain.com
That way myapp.myOTHERdomain.com will point to the A record for myfirstdomain.com.
You may configure your webserver to do the HTTP redirect.