MyBB Community Forums

Full Version: Redirecting old domain to new domain
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
Hey I could do with a bit of help sorting out my new domain name. I have www.olddomain.co.uk and www.newdomain.co.uk

New domain works fine and as I want it to, however I want to set up my site so that www.olddomain.co.uk/* where * means every url existing to the domain, for example www.olddomain.co.uk/forums/fdushffds will go to www.newdomain.co.uk/forums/fdushffds.


What I have done is asked my web host to change my main domain name in my cpanel to my new domain, and I am left with an old domain which will not run out for over a year and hundreds of threads which people may find on google search which could do with linking to my newdomain.co.uk.

I have tried some htaccess things and some things in my cpanel but I have no luck. I can get olddomain.co.uk linking to newdomain.co.uk just fine but all the files and folders after it.


Anyone able to help me here Sad?
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^olddomain.com [nc]
rewriterule ^(.*)$ http://www.newdomain.com/$1 [r=301,nc] 

Put this in .htaccess.
(2011-08-12, 11:49 PM)pyridine Wrote: [ -> ]
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^olddomain.com [nc]
rewriterule ^(.*)$ http://www.newdomain.com/$1 [r=301,nc] 

Put this in .htaccess.

Thanks for reply, is this something that could take time to come in to effect, I have just tried going to olddomain.com/forums and it doesn't seem to be changing to newdomain.com/forums.
Your old domain still needs to be pointing to your server.
(2011-08-13, 08:02 AM)Steven Wrote: [ -> ]Your old domain still needs to be pointing to your server.

You mean the name servers for the domain? I haven't changed them Sad

Bah il just post my urls,

cgamer.co.uk redirects to recastgaming.co.uk just fine
but
cgamer.co.uk/____ wont redirect to recastgaming.co.uk/____

--
I would even be happy if every url someone goes to with www.cgamer.co.uk/** redirects to recastgaming.co.uk
Park the domain on the websites folder, problem solved Wink
(2011-08-13, 08:03 AM)Rob1991 Wrote: [ -> ]
(2011-08-13, 08:02 AM)Steven Wrote: [ -> ]Your old domain still needs to be pointing to your server.

You mean the name servers for the domain? I haven't changed them Sad

Bah il just post my urls,

cgamer.co.uk redirects to recastgaming.co.uk just fine
but
cgamer.co.uk/____ wont redirect to recastgaming.co.uk/____

--
I would even be happy if every url someone goes to with www.cgamer.co.uk/** redirects to recastgaming.co.uk

The solution I posted would do this.
(2011-08-13, 04:35 PM)pyridine Wrote: [ -> ]
(2011-08-13, 08:03 AM)Rob1991 Wrote: [ -> ]
(2011-08-13, 08:02 AM)Steven Wrote: [ -> ]Your old domain still needs to be pointing to your server.

You mean the name servers for the domain? I haven't changed them Sad

Bah il just post my urls,

cgamer.co.uk redirects to recastgaming.co.uk just fine
but
cgamer.co.uk/____ wont redirect to recastgaming.co.uk/____

--
I would even be happy if every url someone goes to with www.cgamer.co.uk/** redirects to recastgaming.co.uk

The solution I posted would do this.

It didnt work Sad Thing is I have changed hosting and the files and folders are exactly the same. I can only ever get cgamer.co.uk linking to recastgaming.co.uk but not other directory files or urls Sad
Most reputable registrars offer forwarding your domain to another.
(2011-08-13, 04:37 PM)Rob1991 Wrote: [ -> ]It didnt work Sad Thing is I have changed hosting and the files and folders are exactly the same. I can only ever get cgamer.co.uk linking to recastgaming.co.uk but not other directory files or urls Sad
The old domain should not be redirecting to the new domain. It needs to point to/be parked at your root directory. Ask your host if you don't know how to do this.
Pages: 1 2