I have 2 websites that share the same server. I use the below code for non-www to www 301 redirect. One of the websites is working perfectly while the other is returning an internal server error when I try to visit the website. I have the code placed in each sites respective folder that contains that sites index file. I have chmod permissions set to 0664 for both sites.
Options +FollowSymlinks
RewriteEngine on
rewritecond %{http_host} ^example.com [nc]
rewriterule ^(.*)$ http://www.example.com/$1 [r=301,nc]
Would anyone have any idea as to what I am doing incorrectly?
Kind regards and thanks in advance for any help,
yeto