I recently migrated a WordPress site to a new server and new domain name. To redirect traffic from the old site to the new, I put in place a simple one-line .htaccess file:
Redirect 301 / http://www.newsite.com/
Now, however, the client wants access to the old site. Is there a way that I can let one person in and redirect everyone else to the new site?
If the client has a (relatively) static IP address, you could do something like this in place of what you currently have:
Alternatively, you might be able to do something like this…
And then (assuming their browser sends the referrer) they could access the old site at http://www.oldsite.com/?noredirect and hopefully any subsequent links they clicked after that would work correctly without redirecting to the new site. I didn’t test this though, so I may have overlooked something.