Why does the following code (in the .htaccess file) work only for the home-page but not any other page? e.g. example.com/house. This did not work, namely I get a canonical domain check failure.
#Force www:
RewriteEngine on
RewriteCond %{HTTP_HOST} ^example.com [NC]
RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]