|
Go4Expert Founder
|
![]() |
| 1Apr2007,21:59 | #11 |
|
Are you trying on the subdomain of some free domain providers then it should go into the subdomain only.
|
|
Go4Expert Member
|
|
| 2Apr2007,02:41 | #12 |
|
When I set my site up originally, I created a sub domain and ran it from there.
It seemed to make sense at the time. Then I bought a new domain (domain.co.uk) and pointed it to the same files as the sub domain. I finally bought another domain (domain.com) which reflects exactly what the site is, so I want to use that !! So I'm looking to redirect the domain.co.uk to domain.com. As domain.co.uk's files are in the subdomains folder, I assume that is where I need to locate the .htaccess ?? Thanks |
|
Go4Expert Founder
|
![]() |
| 2Apr2007,07:00 | #13 |
|
Quote:
Originally Posted by here's jonny |
|
Go4Expert Member
|
|
| 3Apr2007,04:44 | #14 |
|
Hi
I've tested using this : RewriteEngine On RewriteCond %{HTTP_HOST} ^(test\.)?old-domain\.co\.uk$ [NC] RewriteRule ^(.*)$ http://www.new-domain.com/$1 [R=301,L] and it seems to work OK locating the .htaccess in the subdomains directory: This OK for the subdomain, but now I need to consider the second domain. Currently users access the site via: www.2ndDomain.co.uk 2ndDomain.co.uk www.2ndDomain.co.uk/forum 2ndDomain.co.uk/forum How do I redirect that to the new-domain.com ? ? Finally - I have the main domain name.... Users can access via: sub.maindomain.co.uk www.maindomain.co.uk maindomain.co.uk www.maindomain.co.uk/sub maindomain.co.uk/sub How do I redirect that to the new-domain.com ? ? My aim is to get everything going to the new-domain.com... Many Thanks |
|
Go4Expert Founder
|
![]() |
| 3Apr2007,08:24 | #15 |
|
Quote:
Just go through the following question at the SEO FAQ thread. Quote:
Originally Posted by SEO FAQ's |
|
Go4Expert Member
|
|
| 4Apr2007,00:45 | #16 |
|
Shabbir - Thanks
![]() I'm sure I'll be back shortly with some more questions !! |
|
Go4Expert Member
|
|
| 4Apr2007,01:11 | #17 |
I'm back.I need to redirect domain.co.uk & www.domain.co.uk -> www.domain.com Is this correct ?? : Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.co\.uk$ [NC]
RewriteCond %{HTTP_HOST} ^www.domain\.co\.uk$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]
|
|
Go4Expert Founder
|
![]() |
| 4Apr2007,08:25 | #18 |
|
I would redirect everything from domain.co.uk to www version of the new domain and not have a redirect to the www version of domain.co.uk
|
|
Go4Expert Member
|
|
| 4Apr2007,13:23 | #19 |
|
I thought that's what the examples above did !!
Is that not correct ? |
|
Go4Expert Member
|
|
| 4Apr2007,15:18 | #20 |
|
One thing I've just noticed !!
I'm using: Code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^(test\.)?xxxx\.co\.uk$ [NC]
RewriteRule ^(.*)$ http://test.aaaaa.com/$1 [R=301,L]
Except people could still visit by www.xxxx.co.uk/test or xxxx.co.uk/test How do I stop that as well ??? Once I've got this bit and confirmed the other redirects,I'm sorted ![]() Thanks |


