Info
- 4 posts
- 3 voices
- Started 2 years ago by Tomcraft1980
- Latest reply from Olaf
- This topic is resolved
canonical URLs for bbPress 1.02?
-
- Posted 2 years ago #
Hi there,
is there a way to build canonical URLs like WordPress does? WordPress automatically redirects http://domain.tld to http://www.domain.tld and I would like bbPress to do so too.
This is needed to prevent duplicate content on your site.
kind regards
Tom
-
- Posted 2 years ago #
You may do it by .htaccess …
From www to no-www
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} .
RewriteCond %{HTTP_HOST} !^www.myforums.com\.com
RewriteRule (.*) myforums.com/ [R=301,L]and the opposite …
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^myforums.com [NC]
RewriteRule ^(.*)$ http://www.myforums.com/ [L,R=301] -
- Posted 2 years ago #
Ahhh.... this worked for me:
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/forum/$1 [L,R=301]Thx for the hint!
kind regards
Tom
-
- Posted 2 years ago #
how about canonical links like suggested by Google?
http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html -
You must log in to post.