Page 2 of 2 FirstFirst 1 2
Results 16 to 25 of 25

Multiple domains pointing to site.com

This is a discussion on Multiple domains pointing to site.com within the General Discussion forums, part of the vBulletin SEO Discussion category; So the redirect should be: HTML Code: RewriteEngine On RewriteCond %{HTTP_HOST} ^www\.domain\.com$ RewriteCond %{HTTP_HOST} ^www\.domain\.net$ RewriteCond %{HTTP_HOST} ^www\.domain\.org$ RewriteRule ^(.*)$ ...

  1. #16
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    So the redirect should be:

    HTML Code:
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.domain\.com$
    RewriteCond %{HTTP_HOST} ^www\.domain\.net$
    RewriteCond %{HTTP_HOST} ^www\.domain\.org$
    RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]

  2. #17
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    It should be:
    Code:
    RewriteCond %{HTTP_HOST} !^domain\.com$
    RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
    (i.e. "redirect all request that are NOT pointing to domain.com")

  3. #18
    Senior Member
    Real Name
    Alex
    Join Date
    Mar 2007
    Location
    Italy
    Posts
    508
    Liked
    0 times
    Thanks Oleg

  4. #19
    Junior Member
    Real Name
    Dave
    Join Date
    May 2008
    Posts
    14
    Liked
    0 times
    I have a work friendly Ulr that I don't want redirected to the main url. The problem I'm having is that it is showin the hompage of 2nd domain but when you click on a link it redirects to the main domain. Is there any way around It.

  5. #20
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    Hello Dave,

    vBSEO always uses forums URL as defined in vB admincp options to create links.

  6. #21
    Junior Member
    Real Name
    Maurício
    Join Date
    May 2008
    Location
    Porto Alegre, RS, Brazil
    Posts
    5
    Liked
    0 times

    What´s the meaning of $ after domain name in .htaccess file?

    Oleg,

    What´s the meaning of $ after the domain name in this example:
    Quote Originally Posted by Oleg Ignatiuk View Post
    It should be:
    Code:
    RewriteCond %{HTTP_HOST} !^domain\.com$
    RewriteRule ^(.*)$ http://domain.com/$1 [L,R=301]
    (i.e. "redirect all request that are NOT pointing to domain.com")
    Maurício
    Last edited by MaurícioSB; 01-10-2009 at 09:09 PM. Reason: signature

  7. #22
    Senior Member
    Real Name
    Michael Biddle
    Join Date
    Jan 2007
    Location
    Southern California
    Posts
    7,097
    Liked
    5 times
    I believe it is to let it know the condition part is over.
    The Forum Hosting - Forum Hosting from the Forum Experts

  8. #23
    vBSEO Staff Oleg Ignatiuk's Avatar
    Real Name
    Oleg Ignatiuk
    Join Date
    Jun 2005
    Location
    Belarus
    Posts
    25,744
    Liked
    168 times
    Yes, it means that hostname should match domain.com *exactly, i.e. Xdomain.com or domain.comX are NOT matching.

  9. #24
    Member
    Real Name
    Ian
    Join Date
    Sep 2008
    Posts
    65
    Liked
    3 times
    Can I confirm something here:

    I have:
    HTML Code:
    www.mydomain.com
    www.mydomain.net
    www.otherdomain.com
    www.otherdomain.net
    and I want to only use www.mydomain.com

    so I think you are saying that I create aliases of www.mydomain.com
    HTML Code:
    www.mydomain.net
    www.otherdomain.com
    www.otherdomain.net
    and then add this to the .htaccess file in www.mydomain.com:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^www\.mydomain\.net$
    RewriteCond %{HTTP_HOST} ^www\.otherdomain\.com$
    RewriteCond %{HTTP_HOST} ^www\.otherdomain\.net$
    RewriteCond %{HTTP_HOST} !^mydomain\.com$
    RewriteRule ^(.*)$ http://www.mydomain.com/$1 [L,R=301]

    Is this correct - thanks!

  10. #25
    Senior Member Brandon Sheley's Avatar
    Real Name
    Brandon Sheley
    Join Date
    Oct 2005
    Location
    Kansas
    Posts
    2,348
    Liked
    20 times
    Blog Entries
    1
    I just put a 301 code in an index.html folder to do this, should I use the htaccess or is the html file work?
    My forums: General Forums | Admin Talk (running xenforo)

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Multiple domains = problems
    By Nikke86 in forum General Discussion
    Replies: 7
    Last Post: 04-15-2010, 09:25 PM
  2. Blacklisting multiple domains
    By amenadiel in forum LinkBacks
    Replies: 2
    Last Post: 04-15-2008, 09:46 AM
  3. Multiple domains, one forum
    By s0b in forum URL Rewrite Settings
    Replies: 1
    Last Post: 05-21-2007, 09:17 AM
  4. Multiple Domains and Google
    By Citricguy in forum General Discussion
    Replies: 3
    Last Post: 11-19-2006, 10:06 PM
  5. multiple domains pointing to forum
    By MMAFan in forum General Discussion
    Replies: 11
    Last Post: 12-17-2005, 08:24 AM

Posting Permissions

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