Redirecting while working on migration

This is really an Apache question but it’s a common Drupal scenario so I figured someone will already have a 3-line .htaccess that answers my problem. And others might find it useful.

I have an existing client’s site oldsite.com. I’ve developed the D7-based newsite.com on my own server. But their account on their web host is more limited than what I have; I ran into trouble with the migration. Since they needed the Drupal version functioning now, I temporarily finessed around this by a .htaccess on their server with the single line:

Redirect "/" "http://newsite.com"

So everyone going to their site sees the Drupal version instead. But while I’m working on oldsite, I need my requests (and just mine) to be honored by oldsite. I’m fine with limiting the requests to index.php, since I can get to any corner of a Drupal site with URL arguments, with special-casing my originating IP address, or temporarily putting the D7 site in a subdirectory. But everything I’ve tried is leading me to yak-shaving.

mod_rewrite is enabled. I do not have any access to httpd.conf.

Drupal version: 


Source: https://www.drupal.org/taxonomy/term/37/feed