Redirect only home page to another site. not sub pages. example.com to newsite.com using .htaccess
<p>I want to redirect home page alone. But not the sub links. I tried with the following code, but it not works.</p>

<pre><code>   RewriteCond %{REQUEST_URI} ^/[/]?
   RewriteCond %{REQUEST_URI} !^/+[/]?
   RewriteRule (.*) http://www.newdomain.com/ [R=301,L]
</code></pre>

<p>So my requirement is,</p>

<p>When user access : <code>http://test.site.co.uk</code> then should redirected to <code>http://newsite.co.uk</code></p>

<p>When user access : <code>http://test.site.co.uk/mypage</code> then should redirected to <code>http://newsite.co.uk/mypage</code></p>