coolemail2
Basic Pleskian
I have re-built a website on a new domain. Now I want to redirect http://www.olddomain.com/anything or http://olddomain.anything to www.newdomain. Because the file structure is totally different, I want all redirections to go to the Home Page of newdomain.
Initially, I used Standard forwarding in the Plesk CP but that attempts to keep the filename the same. So www.olddomain.com/wibble tries to go to www.newdomain.com/wibble. But wibble dies not exist on the new domain.
Should I use htaccess with physical hosting instead on olddomain.com? Is the following correct?:
Will that basically cover any request? Anything that people have saved or which appears in Google searches, no matter whether http:// or http://www.
And for neatness on the new domain, I would like to add www to any request like http://newdomain.com/whatever to go to http://www.newdomain.com/whatever which I think means that Google analytics will report more accurately.
So would my htaccess file on newdomain.com be like this?:
Many thanks, in advance for any help.
Initially, I used Standard forwarding in the Plesk CP but that attempts to keep the filename the same. So www.olddomain.com/wibble tries to go to www.newdomain.com/wibble. But wibble dies not exist on the new domain.
Should I use htaccess with physical hosting instead on olddomain.com? Is the following correct?:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^olddomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com [R=301,L]
Will that basically cover any request? Anything that people have saved or which appears in Google searches, no matter whether http:// or http://www.
And for neatness on the new domain, I would like to add www to any request like http://newdomain.com/whatever to go to http://www.newdomain.com/whatever which I think means that Google analytics will report more accurately.
So would my htaccess file on newdomain.com be like this?:
Code:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^newdomain.com [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]
Many thanks, in advance for any help.