301 means "permanently moved, and you should refer to this resource using the address I am about to give you in the future." I.e. the browser should replace "
http://www.pauldoranpictures.com/" with "
http://www.pauldoran.co.uk/" whenever a user browses to "
http://www.pauldoranpictures.com/" and your server returns a 301 with "
http://www.pauldoran.co.uk/".
If you use a 302, that's a "resource found and/or redirected temporarily - please continue to refer to this resource using the current url" and the browser won't change it. In other words just an alias.
Assuming apache do this for your vhost:
Code:
<VirtualHost *:80>
ServerName addressyouwanttoredirect.com
RedirectMatch permanent ^/(.*) http://addressyouwanttoredirectto.com/$1
</VirtualHost>
If you don't have direct access to vhosts, then you can wangle it in the .htaccess. If they are separate sites, it's a bit easier with:
Code:
Redirect 301 / http://addressyouwanttoredirectto.com/
If they are on the same server/host, then you'll need to use a rewrite rule and add a condition. Don't worry, it will still use the 301:
Code:
RewriteCond %{http_host} addressyouwanttoredirect.com$ [nc]
RewriteRule ^(.*)$ http://addressyouwanttoredirectto.com/$1 [r=301,nc,L]