Breadcrumbs

Home Web Development How resolve a wordpress site to from non-www to www
How resolve a wordpress site to from non-www to www PDF Print E-mail
Written by Administrator   

If you want to resolve a non-www to www URL e.g. http://crazyhairbeautydeals.com.au/ to http://www.crazyhairbeautydeals.com.au/, you have to edit the .htaccess file of you wordpress site.

Add the follow code piece to the .htaccess

 

# BEGIN WordPress

RewriteEngine On

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

RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /index\.php\ HTTP/
RewriteRule ^index\.php$ http://www.jbspartners.com/ [R=301,L]

RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]

# END WordPress

 

For more info click here.