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

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.
 
Try this in a .htaccess file in your /community directory:

Rich (BB 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.
 
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?
 
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?

Which URL flips that shouldn't flip?

/community is not needed in the second line.
 
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]
 
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.
 
You would have to add each location:

Rich (BB 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.
 
Top Bottom