Skip to:
Content
Pages
Categories
Search
Top
Bottom

canonical URLs for bbPress 1.02?


  • Tomcraft1980
    Member

    @tomcraft1980

    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

Viewing 3 replies - 1 through 3 (of 3 total)

  • Fernando Tellado
    Participant

    @fernandot

    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/$1 [R=301,L]

    and the opposite … 

    Options +FollowSymLinks

    RewriteEngine on

    RewriteCond %{HTTP_HOST} ^myforums.com [NC]

    RewriteRule ^(.*)$ http://www.myforums.com/$1 [L,R=301]


    Tomcraft1980
    Member

    @tomcraft1980

    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


    Olaf Lederer
    Participant

    @finalwebsites

    how about canonical links like suggested by Google?

    http://googlewebmastercentral.blogspot.com/2009/02/specify-your-canonical.html

Viewing 3 replies - 1 through 3 (of 3 total)

You must be logged in to reply to this topic.