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

Force www Question...

Discussion in 'XenForo Questions and Support' started by usAdultAds, Apr 29, 2015.

  1. usAdultAds

    usAdultAds Active Member

    I placed www rules into htaccess on the root domain...
    so the root domain will point to www.domain.com

    But I have noticed, even though www has been placed
    in the the forum url section, it contines to point too..


    Is not not just important to avoid duplicate content by
    getting it to point too http://www.domain.com/community/ ?

    So the root domain goes like this:


    But if you come from another location:


    What are your thoughts?
  2. Martok

    Martok Well-Known Member

  3. usAdultAds

    usAdultAds Active Member

    So far nothing...

    I can get domain.com to go www.domain.com
    but I can not get domain.com/community to go www.domain.com/community

    It could also be a server glitch, when I setup a redirect I noticed domain.com was
    redirecting to a non valid url while www redirected where it was supposed to go....

    maybe the server does not understand the redirect rules. As for the root domain goes,
    it seems to understand clearly, but when it comes to domain.com/community
    nothing but domain.com/community
  4. Brogan

    Brogan XenForo Moderator Staff Member

    Which rewrite rules have you tried and what do you currently have in the .htaccess file (and where are the rules placed)?
  5. usAdultAds

    usAdultAds Active Member

    I have tried them all...
    I placed each one just below RewriteEngine On

    Take this one for example:
    RewriteEngine On
    RewriteCond %{http_host} ^domain.com/community$ [NC]
    RewriteRule ^(.*)$ http://www.domain.com/community/$1 [R=301]

    Is it setup correctly?

    The forum works, but it does not turn over to www.domain.com/community
  6. usAdultAds

    usAdultAds Active Member

    This was the host fix for the redirect in htaccess for those that
    do not have their forum in root, placed at top of .htaccess

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

    Redirect to www is working just fine now.
    Last edited: Apr 29, 2015
    Digital Doctor likes this.

Share This Page