1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Multiple domains accessing same forum ... leads to ...

Discussion in 'Server Configuration and Hosting' started by LPH, May 10, 2012.

  1. LPH

    LPH Well-Known Member

    Hi,

    I have multisite WP enabled, with different domains mapped. Now, all of the domains need to use /community to login because the XenScripts bridge is used. However, this is leading to duplicate content being seen by search engines.

    Will I block the duplicate content issues if I put a robots.txt file with the following disallow?

    Code:
    User-agent:*
    Disallow:
    Disallow: /http://www.tabletquestions.com/community/
    Disallow: /http://www.amdviews.com/community/
    Disallow: /http://www.insanepolitics.com/community/
    
    Etc. ... for all the domains ...

    Is there a better way? The user must be able to login using XenScripts bridge but the content must be seen as unique under one domain ... in other words .. I cannot do a redirect to a particular domain or else people cannot log into the WordPress.
     
  2. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Try this in a .htaccess file in your /community directory:

    Code:
    RewriteEngine On
    
    RewriteCond %{HTTP_HOST} !^www\.maindomain\.com$
    RewriteCond %{REQUEST_URI} !login/login
    RewriteRule ^(.*)$ http://www.maindomain.com/community/$1 [R=301,L]
    
    Assuming it's the "login/login" action that WP needs...

    This will redirect all /community locations to your main domain except for the login/login action.
     
  3. LPH

    LPH Well-Known Member

    OK. So - you are putting in a not for the login ... .. let me try that !
     
  4. LPH

    LPH Well-Known Member

    Close but still flips to the other domain.

    Code:
    RewriteCond %{HTTP_HOST} !^www\.tuxreportsdebates\.com$
    RewriteCond %{REQUEST_URI} !login/login
    RewriteRule ^(.*)$ http://www.tuxreportsdebates.com/community/$1 [R=301,L]
    maybe the second line needs to have the /community in some how?
     
  5. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Which URL flips that shouldn't flip?

    /community is not needed in the second line.
     
  6. LPH

    LPH Well-Known Member

    All of the mapped domains are flipping when trying to login with /community/login.

    go to www.tuxreportsnetwork.com then click on /community/login link it will flip to www.tuxreportsdebates.com

    or go to www.insanepolitics.com then click on login link and it will flip ...

    etc

    ---

    I've removed the rewrites from the .htaccess for now.
     
  7. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    Then you need to specify the login form as well:

    Code:
    RewriteCond %{HTTP_HOST} !^www\.tuxreportsdebates\.com$
    RewriteCond %{REQUEST_URI} !(/login/login|/login)
    RewriteRule ^(.*)$ http://www.tuxreportsdebates.com/community/$1 [R=301,L]
    
     
  8. DRE

    DRE Well-Known Member

    *subscrizzle
     
  9. LPH

    LPH Well-Known Member

    Thank you for trying Jake but something must be squirmy with the way I have this mapped and laid out. That code didn't work either.

    I also tried to add in the logout portion because that would have to be blocked too. Unfortunately, it's still rolling over.

    I was placing this in an .htaccess in /community. It is removed right now because it flips everything to tuxreportsdebates and I cannot login or logout.
     
  10. Jake Bunce

    Jake Bunce XenForo Moderator Staff Member

    You would have to add each location:

    Code:
    RewriteCond %{HTTP_HOST} !^www\.tuxreportsdebates\.com$
    RewriteCond %{REQUEST_URI} !(/login/login|/login|/logout)
    RewriteRule ^(.*)$ http://www.tuxreportsdebates.com/community/$1 [R=301,L]
    
    It works in my testing. I can take a look if you want.
     
  11. LPH

    LPH Well-Known Member

    I'm sending you a PM :)
     

Share This Page