How To Rewrite www to non-www domain using htaccess

Here is a simple way to rewrite your domain from www.yourdomain.com to yourdomain.com without www

This is simply add few lines into your .htaccess files.

Below is the example how to do that

 

<IfModule mod_rewrite.c>
  RewriteEngine on

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

</IfModule>

Change it to your domain name.
After that tested it out again.

This should be working

 

Facebook Fans