You can set the DNS record like mod_rewrite in Apache? Where?
anything.myapp.com > redirect to > myapp.appspot.com/anything
dynamically, hundreds of thousands of accounts...
Or do I need the Apache server to redirect?
This question came from our site for professional and enthusiast programmers.
There shouldn't be any need to do this, because there's no implicit association between URL and filename in App Engine - you can simply design your app with the URL routing you want in the first place.
If you do absolutely need to do this, you can write some WSGI middleware (in Python), or a servlet filter (in Java) that modifies incoming requests before they're handled.