Redirecting non-www to www

Jeffin

Well-known member
How do I do that in .htaccess and vice-versa?

Which in your opinion is better for SEO?

Thanks.
 
this is how it is in my .htaccess but it still doesn't work:

# Mod_security can interfere with uploading of content such as attachments. If you
# cannot attach files, remove the "#" from the lines below.
#<IfModule mod_security.c>
# SecFilterEngine Off
# SecFilterScanPOST Off
#</IfModule>

<IfModule mod_rewrite.c>
RewriteEngine On

# If you are having problems with the rewrite rules, remove the "#" from the
# line that begins "RewriteBase" below. You will also have to change the path
# of the rewrite to reflect the path to your XenForo installation.
#RewriteBase /xenforo

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -l [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^.*$ - [NC,L]
RewriteRule ^(data|js|styles|install) - [NC,L]
RewriteRule ^.*$ index.php [NC,L]
</IfModule>

RewriteCond %{HTTP_HOST} ^christianforumsite.com [NC]
RewriteRule ^(.*)$ http://www.christianforumsite.com/$1 [L,R=301]
 
Top Bottom