There are many ways to redirect from a staging site to the live site. In this example I will show you how to do it using an MU plugin.
You'll need to edit the target site shown in the snippet below and then create a file in the specified directory.
Since this is an MU plugin it doesn't need to be specifically activated and therefore those who have access to the site via FTP can remove it.
The closing php tag is intentionally omitted so there is no whitespace inserted accidentally.
wp-content/mu-plugins/my_custom_deactivator.php
[code]
<?php
add_action('plugins_loaded', 'my_custom_deactivator_redir2live');
function my_custom_deactivator_redir2live() {
header('Location: http://youmainsite.com', true, 301);
die;
}
[/code]