Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.lifein19x19\.com [NC]
RewriteCond %{HTTP_HOST} !=""
RewriteRule ^(.*)$ http://www.lifein19x19.com/$1 [L,R=301]
Code: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\.lifein19x19\.com [NC]
RewriteCond %{HTTP_HOST} !=""
RewriteRule ^(.*)$ http://www.lifein19x19.com/$1 [L,R=301]
One question: Are you suggesting to add "www." to every url? How about the other way round?ross wrote: This will ensure that if somebody leaves off the "www", or visits the site using another domain name that points here, the URL will get canonicalized to its proper, "one true form". There can be only one!
The site will work either way, it's just a matter of how it shows up in the URL bar (and how search engines and cookies treat it, etc). I'm agnostic as to which way is better, I just think it should be standardized. You probably don't even notice the sites that put it on automatically for you, only the misconfigured sites that don't allow the "www." at all.ChradH wrote:One question: Are you suggesting to add "www." to every url? How about the other way round?
I find this "www." prefix highly redundant and really hate sites that only work when it's added. Please, let's keep it short and simple.
I'm with you there, having one canonical address is a must. And though I might survive having "www." pasted in front of the sleek and elegant lifein19x19 I just typed into the address bar, I'd like it better without.ross wrote: The site will work either way, it's just a matter of how it shows up in the URL bar (and how search engines and cookies treat it, etc). I'm agnostic as to which way is better, I just think it should be standardized. You probably don't even notice the sites that put it on automatically for you, only the misconfigured sites that don't allow the "www." at all.
Hmm, I don't see that we "need" to pick one; both work, and it's a pretty standard "hack" for websites. I do it on all mine. If there's a DNS issue, that'd be somewhat odd - no one else has posted about DNS issues for the URL.fwiffo wrote:I don't care which version we use, we just need to pick one. I've actually been having DNS issues with the www version, weirdly enough, so I guess I favor the shorter version...
By "pick one" we mean standardize on one to 301-redirect the others to (for aforementioned SEO, cookie, etc. issues).kirkmc wrote:Hmm, I don't see that we "need" to pick one; both work, and it's a pretty standard "hack" for websites. I do it on all mine. If there's a DNS issue, that'd be somewhat odd - no one else has posted about DNS issues for the URL.
Yes we do, Ross is right.kirkmc wrote: Hmm, I don't see that we "need" to pick one; both work,
Ummmm... did you find that you need to have a canonical URL, and you're going to use modrewrite to do a 301 redirect?Jordus wrote:We think we have found the problem. We will try fixing soon during a period of low traffic.
Originally I came across this on a phpbb3 site:ross wrote:Ummmm... did you find that you need to have a canonical URL, and you're going to use modrewrite to do a 301 redirect?Jordus wrote:We think we have found the problem. We will try fixing soon during a period of low traffic.Or are you attempting some other solution?
\I would suggest you set your cookie domain in phpbb and all products to this
.domain.com
reason being if someone clicks some link and there is not a www in it or say they login in phpbb without the www the cookie is not recognized on www or vice versa with no www depending on how they login. with a cookie domain of .domain.com your users will be logged in continuously nomatter the subdomain.
Also if logging in through PHPBB make sure they click the remember me button to create a cookie since our products work with cookies not sessions.