Redirect non-www to www

hey guys,
i was wondering if it is possible to redirect non-www URL to www URL the C5 way for better SEO.

i tried adding these lines into .htaccess:

#RewriteEngine On
#RewriteCond %{HTTP_HOST} ^
#RewriteRule (.*)$1 [R=301,L]

But it generated error that says:

"This webpage has a redirect loop."

Any solution is gratefully appreciated. Thanks

View Replies:
synlag replied on at Permalink Reply
This should work without a rewrite rule if your server is configured correctly.

Make sure you have set

define('BASE_URL', '');

in config/site.php

astrosurge replied on at Permalink Reply
hey that worked!
michaelmowry replied on at Permalink Reply
In 5.7 would the change below be made in the application/config/app.php file?

define('BASE_URL', '');