![]() |
|
|||||||
| Free Help & Advice Ask any questions you wish. See if you can stump our members. Limit questions to the search engine field. ALL general questions about search engines should go in here. NOT in the Google Forum!! |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
#1
|
||||
|
||||
|
301 Redirects for multiple domains.
This is what you need for an Apache webserver:
Options +FollowSymLinks RewriteEngine on RewriteCond %{HTTP_HOST} ^domain.com [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301] RewriteCond %{HTTP_HOST} ^www.domain.com [NC] RewriteRule ^(.*)$ http://www.newdomain.com/$1 [L,R=301] First block you need once only. Second block: you need one for each domain.com that needs redirecting (including newdomain.com to www.newdomain.com too). Third block: you need one for each www.domain.com that needs redirecting to www.newdomain.com. Remove all of the blank lines from the above example. Put it all in the .htaccess file in the web root folder. Before you upload a new .htaccess file, make sure, using FTP, that there isn't one already there as the new one will overwrite it. Be aware, too, that many FTP programs are set to hide all file names that begin with a dot; so you need to unset that option first. Point all of the domains involved to that one webserver, and load the .htaccess file onto that same webserver too. This will force that webserver to have just one canonical name for every and all pages accessed. Last edited by g1smd; 15-09-2005 at 19:17/07:17PM. |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|