PDA

View Full Version : Redirect www to Non www using htaccess 301 redirect Search Engine Friendly one :p



AP admin
07-09-2010, 12:49 AM
paste this code to your .htaccess file


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

of-course you will replace the domain :p

Seanlopez
07-11-2010, 04:57 AM
I am normally using this code


<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www.yourdomain.com [NC]
RewriteRule ^(.*)$ http://yourdomain.com/$1 [L,R=301]
</IfModule>