Canonical URLs

Discussion in 'Programming' started by jackzliu, Feb 21, 2011.

  1. #1
    I have a question about writing 301 redirects to make "domain.com" to "www.domain.com". My current setup is that I have a Wordpress blog at "domain.com" and vBulleting at "domain.com/forums". By default, when someone types in "domain.com", it redirects to "www.domain.com". But if I typed in "domain.com/forums", it doesn't redirect it to "www.domain.com/forums". I was thinking that I would need to write a few lines for the .htaccess file at the root folder of the /forums folder. But that didn't work.

    The .htaccess file at the root shows:
    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]
    </IfModule>
    # END WordPress
    Code (markup):
    Appreciate any help with this. Thanks.
     
    jackzliu, Feb 21, 2011 IP