0 votes
590 views
in General by

1 Answer

0 votes
by
selected by
 
Best answer

You need to add 

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

in .htaccess file. Note that you must put the above lines somewhere after RewriteEngine On line.

Related questions

0 votes
1 answer 3.7k views
0 votes
1 answer 601 views
0 votes
1 answer 605 views
asked Oct 4, 2021 in General by Tester Testee (220 points)
0 votes
1 answer 1.2k views
0 votes
2 answers 5.6k views
asked Jul 17, 2018 in General by anonymous
+1 vote
1 answer 9.1k views
...