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

XF 1.3 Cookies: 2 Domains, 1 Forum

Discussion in 'XenForo Questions and Support' started by taylor_smith, Nov 5, 2014.

  1. taylor_smith

    taylor_smith Well-Known Member

    I have one forum installation installed at http://noobist.com/community. The website noobist.com is part of a WordPress Multisite network, which includes noobist.tv. For some reason, http://noobist.tv/community also points to the same forum installation (same software, database, etc.).

    The only difference: cookies don't carry between the domains.

    What are my options here? Can I enable cross-domain cookies so people stay logged in? Should I just set up a permanent redirect from noobist.tv/community > noobist.com/community? I'd sort of prefer the former, but maybe the latter is the only way.
     
  2. Jeremy

    Jeremy Well-Known Member

    You should perform a redirect if you wish the community to be at .com. Otherwise, cross domain cookies aren't really a "thing" and would require an add-on to create both.
     
    taylor_smith likes this.
  3. taylor_smith

    taylor_smith Well-Known Member

    Well, since Noobist.TV is a separate brand, it'd be nice to have both functioning. But I haven't always had much luck finding addon developers for cross-domain-type products. Ah, well.

    Thanks.
     
  4. taylor_smith

    taylor_smith Well-Known Member

    There was an error adding the redirect.

    You cannot redirect "community" to "http://noobist.com/community" as this will cause a redirection loop because "/home2/noobist/public_html/community" is at the same place as "/home2/noobist/public_html/community".

    Since noobist.tv is part of the WPMU network, they all sit on the same root directory.
     
  5. Jeremy

    Jeremy Well-Known Member

    What was your redirect code? And how were you redirecting?
     
  6. taylor_smith

    taylor_smith Well-Known Member

    cPanel > redirects
     
  7. Jeremy

    Jeremy Well-Known Member

    .htacess redirects will allow proper domain redirection.
     
  8. taylor_smith

    taylor_smith Well-Known Member

    I need to choose either a file or directory to redirect. Sadly, there are no files or directories that differentiate the two, because both domains share the same directories/files. :<
     
  9. Jeremy

    Jeremy Well-Known Member

    A direct .htacdrss rule will allow you to redirect based on domain. I'm mobile so I really can't give you the rule, but a quick search of Google should help.
     
    taylor_smith likes this.
  10. Mike

    Mike XenForo Developer Staff Member

  11. taylor_smith

    taylor_smith Well-Known Member

    I already have some rewrite rules in my .htaccess. Should I be concerned about adding more rules? Here's what I have currently:

    Code:
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^wp-admin$ wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^(wp-(content|admin|includes).*) $1 [L]
    RewriteRule ^(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    
     
  12. Mike

    Mike XenForo Developer Staff Member

    Additional rules would be fine. You would need to add them to the top though (or at least before that last block as that's a catch-all).
     

Share This Page