Transfer to New Host and Redirect to new domain.

Discussions and support about the different URL Rewriting techniques for phpBB.

Moderator: Moderators

Transfer to New Host and Redirect to new domain.

Postby Br33zer » Sat Feb 06, 2010 10:34 pm

Hello,

I have installed all the MODs from here. Now I'm transferring to a new host and also I want my present domain to redirect to new domain which I have registered.

Do I need to change anything MOD wise? Or only redirection from the cPanel is enough? (Old Domain to New Domain)

Also, I have got decent number of links indexed by search engines with Google (site:myforum.com) already returning 5320 and also PR being 1 in just 2.5 months thanks to phpBB-SEO :)

So please tell me how do I redirect to my new domain?

Thanks

http://www.gossipall.com/
Last edited by Br33zer on Sat Jun 26, 2010 10:51 pm, edited 1 time in total.
Br33zer
 
Posts: 38
Joined: Thu Nov 26, 2009 12:38 pm

Advertisement

Re: Transfer to New Host and Redirect to new domain.

Postby dcz » Fri Mar 12, 2010 12:50 pm

It mus be a phpBB Server and Cookie settings issue. You must set it right.
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21291
Joined: Fri Apr 28, 2006 9:03 pm

Re: Transfer to New Host and Redirect to new domain.

Postby Br33zer » Tue Mar 30, 2010 8:03 pm

I actually want to redirect my present domain to a new domain, the website being the same. The problem is I have good SERPs with my present domain. So if I redirect my present domain to the new domain, will that be fine? Will all the indexed pages transfer themselves with new domain link after a period of time?

Also what about the RSS and Sitemapindex link? If i change it to new domain from ACP>phpBB-SEO, will it affect the already indexed feeding?

Thanks.
Br33zer
 
Posts: 38
Joined: Thu Nov 26, 2009 12:38 pm

Re: Transfer to New Host and Redirect to new domain.

Postby dcz » Wed Mar 31, 2010 9:58 am

To do so, the simplest is to have the old domain still linked to your new host and new domain, and to let the www redirection to handle all the redirect :
Code: Select all
olddomain/*.* => http 301=>  newdopmain/*.*

This way, all the old links will be redirected to the new ones at once. All you have to additionally do is to make sure that your server settings are consistent, as well as the GYM scripts urls.

This redirection is automatically added by the .htaccess generator, but it is left commented (since it must be validated by you before you keep it as is). It looks like :
Code: Select all
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{HTTP_HOST} !^www\.example\.com$ [NC]
# RewriteRule ^(.*)$ http://www.example.com/$1 [QSA,L,R=301]

or :
Code: Select all
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{HTTP_HOST} !^example\.com$ [NC]
# RewriteRule ^(.*)$ http://example.com/$1 [QSA,L,R=301]

if you did not keep the www in your server settings.

Any domain not being exactly "www.example.com" (or example.com without the www) will be redirected, this includes all other domains that would be set to reach there would as well be redirected.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21291
Joined: Fri Apr 28, 2006 9:03 pm

Re: Transfer to New Host and Redirect to new domain.

Postby Br33zer » Wed Mar 31, 2010 12:23 pm

I can host only one website and I can have a max of 4 parked domains. Can you please tell me what edits I have to do taking examples of my new domain as -http://www.newdomain.com and old domain as -http://www.olddomain.com

Only htaccess edits are required and nothing else? I don't want to lose my indexing.
Br33zer
 
Posts: 38
Joined: Thu Nov 26, 2009 12:38 pm

Re: Transfer to New Host and Redirect to new domain.

Postby Br33zer » Thu Apr 01, 2010 6:25 pm

I did this:

Code: Select all
# You may need to un-comment the following lines
# Options +FollowSymlinks
# To make sure that rewritten dir or file (/|.html) will not load dir.php in case it exist
# Options -MultiViews
# REMEBER YOU ONLY NEED TO STARD MOD REWRITE ONCE
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
# RewriteCond %{HTTP_HOST} !^www\.olddomain\.com$ [NC][OR]
# RewriteCond %{HTTP_HOST} !^olddomain\.com$ [NC]
# RewriteRule ^(.*)$ http://www.newdomain.com/$1 [QSA,L,R=301]



But it's not working. When I try to browse my forum by olddomain, it still opens with olddomain only. What should I do now?

For your knowledge:

My root has folder olddomain.com (which is the add on) while my newdoamin is parked on olddomain.
Br33zer
 
Posts: 38
Joined: Thu Nov 26, 2009 12:38 pm

Re: Transfer to New Host and Redirect to new domain.

Postby austin881 » Thu Apr 01, 2010 7:39 pm

You know that # comments out the line, right?
My dev playground: Whoa.co
Appreciate my assistance? You can thank me by linking to my Chevrolet Astro forums.
User avatar
austin881
phpBB SEO Team
phpBB SEO Team
 
Posts: 249
Joined: Wed Oct 28, 2009 12:16 am
Location: Boise, Idaho USA

Re: Transfer to New Host and Redirect to new domain.

Postby Br33zer » Thu Apr 01, 2010 8:28 pm

Yes, and I actually tried it out without # also. I tried with this:

Code: Select all
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
#RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]
#RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]


And when I try to browse olddomain.com, it keeps loading and loading and the browser returns this: Firefox has detected that the server is redirecting the request for this address in a way that will never complete.

Do I have to make the new domain as add on and the old domain as parked on new domain to effect this redirect?
Br33zer
 
Posts: 38
Joined: Thu Nov 26, 2009 12:38 pm

Re: Transfer to New Host and Redirect to new domain.

Postby Br33zer » Sat Apr 03, 2010 3:05 pm

I have made the new domain as Add on and the old domain as parked on new domain and made the changes like this:

Code: Select all
RewriteEngine On
# REWRITE BASE
RewriteBase /
# HERE IS A GOOD PLACE TO FORCE CANONICAL DOMAIN
RewriteCond %{HTTP_HOST} ^olddomain\.com$ [OR]
RewriteCond %{HTTP_HOST} ^www\.olddomain\.com$
#RewriteRule ^(.*)$ http://newdomain.com/$1 [R=301,L]
#RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]



However, when I try to browse thorugh olddomain.com, the forum still opens with the olddomain.com

And when i click a thread link from google results (of olddomain.com), the thread opens with olddoamin and it is not getting rewritten into new domain.
Br33zer
 
Posts: 38
Joined: Thu Nov 26, 2009 12:38 pm

Re: Transfer to New Host and Redirect to new domain.

Postby dcz » Sat May 01, 2010 12:42 pm

Try :
Code: Select all
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} !^www\.newdomain\.com$ [NC]
RewriteRule ^(.*)$ http://www.newdomain.com/$1 [R=301,L]

In the newdomain.com root's .htaccess.

With this, any domain not being exactly "www.newdomain.com" will be redirected, including newdomain.com and any other domain that may end up leading to this location (eg newdomain's root).

Not that this exact rule should be added automatically by the .htaccess generator, but left commented to prevent mess up when the phpBB domain is not properly set.
If you have set up your .htaccess in a sub directory, the .htaccess should still generate the proper rules (they are a bit different in such case, they include the sub directory in the redirect) to handle the canonical domain, but it will not be active in the upper directories (there you'll need to add an .htaccess with rules to do so). If a subdirectory also start mod_rewrite, then, you again need to add the canonical rewriterules to protect that particular directory.

++
Useful links :
SEO Forum || SEO Directory || SEO phpBB || Search
____________________

Liens Utiles :
Forum référencement || Annuaire référencement || Référencement phpBB || Recherche
dcz
Admin
Admin
 
Posts: 21291
Joined: Fri Apr 28, 2006 9:03 pm

Re: Transfer to New Host and Redirect to new domain.

Postby Br33zer » Sun May 02, 2010 10:56 pm

Thanks dcz, it's solved. :)
Br33zer
 
Posts: 38
Joined: Thu Nov 26, 2009 12:38 pm

Re: Transfer to New Host and Redirect to new domain.

Postby postcd » Mon Oct 11, 2010 8:11 pm

It works and redirects all old domain threads to the new domain. Nice. :D

(added above code into my new domains htaccess). I would like to ask if its google friendly and if these are redirects which are fillowed or if i will loose all olddomain links as a non working and new linnks on new domain must be indexed from beginning?

Thank YOU! :idea:
postcd
 
Posts: 1
Joined: Mon Oct 11, 2010 8:08 pm


Return to phpBB mod Rewrite

 


  • Related topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: Exabot [Bot] and 7 guests