.htaccess permanent redirect to www
snippet in htaccess

.htaccess permanent redirect to www

user8613

define('WP_HOME',"http://www.example.com/dev");
define('WP_SITEURL',"http://www.example.com/dev");

.htaccess permanent redirect to www

user5537

Options +FollowSymlinks
RewriteCond %{HTTP_HOST} !^(www\.|$) [NC]
RewriteRule ^ http://www.%{HTTP_HOST}%{REQUEST_URI} [R=301,L]