301 or 302 Redirection With PHP
<p>I'm considering using the following code during a website launch phase to show users a 'down for maintenance' page while showing me the rest of the site. </p>

<p>Is there a way to show the correct 302 re-direction status to search engines or should I look for another htaccess based approach?</p>

<pre><code>&lt;?
$visitor = $_SERVER['REMOTE_ADDR'];
if (preg_match("/192.168.0.1/",$visitor)) {
      header('Location: http://www.yoursite.com/thank-you.html');
} else {
      header('Location: http://www.yoursite.com/home-page.html');
};
?&gt;
</code></pre>
