Page 2 of 4 FirstFirst 1 2 3 4 LastLast
Results 16 to 30 of 59

Changing Domains: Directing Old Site to the New Site with htaccess

This is a discussion on Changing Domains: Directing Old Site to the New Site with htaccess within the General Discussion forums, part of the vBSEO SEO Plugin category; Try: Code: Options +FollowSymLinks RewriteEngine on RewriteRule (.*) http://www.domain.com [L,R=301]...

  1. #16
    Senior Member Array
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,095
    Liked
    5 times
    Try:

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.domain.com [L,R=301]
    The Forum Hosting - Forum Hosting from the Forum Experts

  2. #17
    Senior Member Array Brandon Sheley's Avatar
    Real Name
    Brandon Sheley
    Join Date
    Oct 2005
    Location
    Kansas
    Posts
    2,364
    Liked
    26 times
    Blog Entries
    2
    Quote Originally Posted by Michael Biddle View Post
    Try:

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.domain.com [L,R=301]
    works great, thanks guys!

  3. #18
    Member Array
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    Quote Originally Posted by Joe Ward View Post
    To do so, you just need to add (or edit) a htaccess file to the root of the old site. The contents of the .htaccess should be the following:

    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://www.domain.com/$1 [L,R=301]
    Replace www.domain.com with the domain of your new site.
    I've had to move my site to another domain and I've got a bit of an issue I can't get my head around.

    I have a wordpress install on the root of the domain and vbulletin in domain.com/forums/

    the domain switch over is fine and both are working ok
    the old domain 301s to the new domain fine for the wordpress install

    though the forum is working on both domains, I tried putting the above code in the .htaccess in the /forums/ folder (of the old domain) but I'm getting a redirect loop error when I do that

    any suggestions where I go from here, if you need any more info from me than let me know

    any help is appreciated

  4. #19
    Senior Member Array
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,095
    Liked
    5 times
    Hello,

    Are they on two different servers?
    The Forum Hosting - Forum Hosting from the Forum Experts

  5. #20
    Member Array
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    same server, I got my hosts to set the new domain in place of the old one

    the old one is now parked if that helps?

    I presume I've got some rewrite conflict going on somewhere but I'm lost

  6. #21
    Senior Member Array
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,095
    Liked
    5 times
    What is your current .htaccess in your forum directory?
    The Forum Hosting - Forum Hosting from the Forum Experts

  7. #22
    Member Array
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    Code:
    RewriteCond %{HTTP_HOST} ^www\.bbtactics\.com$
    RewriteRule ^(.*)$ http://bbtactics.com/forums/$1 [L,R=301]
    
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    #RewriteBase /
    
    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    that is the .htaccess on bloodbowlplaybook.com/forums/

    when I add:
    Code:
    Options +FollowSymLinks
    RewriteEngine on
    RewriteRule (.*) http://bbtactics.com/forums/$1 [L,R=301]
    that is when it gets the redirect loop on bbtactics.com

  8. #23
    Senior Member Array
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,095
    Liked
    5 times
    Please make it:

    Code:
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    #RewriteBase /
    
    RewriteCond %{HTTP_HOST} ^www\.bbtactics\.com$
    RewriteRule ^(.*)$ http://bbtactics.com/forums/$1 [L,R=301]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [L,QSA]
    The Forum Hosting - Forum Hosting from the Forum Experts

  9. #24
    Member Array
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    ok I've done that and bloodbowlplaybook.com/forums/ still isn't redirecting to bbtactics/forums/

    my hosts added the following to the .htaccess in the root which seems to be working for the wordpress install in the root

    Code:
    RewriteCond %{HTTP_HOST} ^bloodbowlplaybook.com$ [OR]
    RewriteCond %{HTTP_HOST} ^www.bloodbowlplaybook.com$
    RewriteRule ^/?$ "http\:\/\/bbtactics\.com\/" [R=301,L]
    I tried a variation of that in the /forums/ .htaccess but had no joy with that either

  10. #25
    Senior Member Array
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,095
    Liked
    5 times
    Rather then parking it, are you able to use it as an addon domain?
    The Forum Hosting - Forum Hosting from the Forum Experts

  11. #26
    Member Array
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    it is on a reseller account so should be able to

  12. #27
    Senior Member Array
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,095
    Liked
    5 times
    As I have no real experience with the parking, I normally just use the addon domain, and use the .htaccess from post number one of this thread and it redirects all traffic.
    The Forum Hosting - Forum Hosting from the Forum Experts

  13. #28
    Member Array
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    I'll give that a go over the weekend instead then, thanks for your help

  14. #29
    Member Array
    Real Name
    Grumbledook
    Join Date
    Jun 2006
    Posts
    37
    Liked
    0 times
    Right I scrapped the parked domain and set it up as an addon and used the code as suggested and it did the trick.

    Thanks a lot for your help, may santa bring all you ask for!

  15. #30
    Senior Member Array
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,095
    Liked
    5 times
    Glad you got it all sorted out.

    I hope he does as well, but I do not think he can afford the Alpine Star full leather suit I am asking for.
    The Forum Hosting - Forum Hosting from the Forum Experts

Page 2 of 4 FirstFirst 1 2 3 4 LastLast

Similar Threads

  1. Multiple domains pointing to site.com
    By Zagis in forum General Discussion
    Replies: 24
    Last Post: 02-27-2009, 01:08 AM
  2. Changing URL for site..
    By Martyn in forum General Discussion
    Replies: 3
    Last Post: 09-18-2007, 07:37 AM
  3. 2 domains - 1 site
    By nlpconnections in forum General Discussion
    Replies: 2
    Last Post: 08-08-2007, 12:25 PM
  4. Replies: 0
    Last Post: 07-18-2007, 06:03 PM
  5. CHanging site URL
    By wellrooted in forum General Discussion
    Replies: 1
    Last Post: 04-23-2007, 02:29 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •