To redirect www.scriptplazza.com to scriptplazza.com without specifying the domain name use following snippet.

RewriteEngine On

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
Source: http://stackoverflow.com/questions/234723/generic-htaccess-redirect-www-to-non-www
 

Leave a Comment

You must be logged in to post a Review.