0 votes
640 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.8k views
0 votes
1 answer 702 views
0 votes
1 answer 711 views
asked Oct 4, 2021 in General by Tester Testee (220 points)
0 votes
1 answer 1.3k views
0 votes
2 answers 5.7k views
asked Jul 17, 2018 in General by anonymous
+1 vote
1 answer 9.1k views
...