I want to redirect non-www URL to www URL in WordPress.
I added code for the redirect but I see that I only redirect URL internally but not accessible from the externally. I redirect to apache default page
I added coed in .htaccess
.
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteCond %{HTTP_HOST} !^www\. [NC]
RewriteRule ^(.*)$ http://www.%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
Not work externally. I also set www in secure/non-secure URL.
Does have any solution?