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

Please help fix WWW rule...

Discussion in 'Troubleshooting and Problems' started by usAdultAds, Aug 3, 2015.

  1. usAdultAds

    usAdultAds Active Member

    I have tired rule after rules, but cant get the forum to
    point to www (at least not in working condition...)

    Root works fine; forum is not in root.

    however, when I go to forum it is:


    I tried the following rule in htaccess

    RewriteBase /
    RewriteCond %{HTTP_HOST} ^domain\.com$ [NC]
    RewriteRule ^(.*)$ http://www.domain.com/community/$1 [R=301,L]
    It does point too:

    however, the post urls no longer work, ie 404

    any solutions?

    Last edited: Aug 3, 2015
    Alex S likes this.
  2. AndyB

    AndyB Well-Known Member

    Add this to the .htaccess located in the forum folder. Of course you will need to change to your domain and forum folder.

    	RewriteCond %{HTTP_HOST} !^www\.
    	RewriteRule ^(.*)$ http://www.example.com/forums/$1 [R=301,L] 
    Put these two lines of code here:

    Alex S and usAdultAds like this.
  3. usAdultAds

    usAdultAds Active Member

    The little changes that can make a difference between working and not...
    appears to work like a charm. thanks
    AndyB likes this.
  4. Alex S

    Alex S Member

    What is mean of this rule?
  5. usAdultAds

    usAdultAds Active Member

    It forces www onto the domain..
    rather then domain.com it will be www.domain.com

    If you use both, then google may see this as duplicate content.
    It is best to use one or the other, but not both...
    AndyB likes this.
  6. Alex S

    Alex S Member

    It' have a rules in CloudFlare. :)
    Rules http://domain.com/
    Forwarding https://www.domain.com/ Forwarding type  Permanent - 301
    and .htaccess I don't use :whistle:
  7. Tracy Perry

    Tracy Perry Well-Known Member

    And what happens when CloudFlare takes a dump or doesn't work and you need to take it out of the equation? ibcool.gif

Share This Page