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

Force www Question...

#1
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..

domain.com/community/

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:

www.domain.com

But if you come from another location:

domain.com/community/

What are your thoughts?
 
#3
It should work for all URLs based on your domain, so you haven't set this up correctly.

See Point 19 of the FAQ on www to non-www (and vice versa) redirection.

https://xenforo.com/community/threads/frequently-asked-questions.5183/
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
 

Brogan

XenForo moderator
Staff member
#4
Which rewrite rules have you tried and what do you currently have in the .htaccess file (and where are the rules placed)?
 
#5
Which rewrite rules have you tried and what do you currently have in the .htaccess file (and where are the rules placed)?
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