Back htaccess

Redirect from www to non-www or vice versa

WRITTEN BY ON 02 Mar 2014
3,925 VIEWS • SHARES
0 comments

Make www redirection with htaccess. You can redirect from www to non-www or vice versa.

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

Comments will be moderated and rel="nofollow" will be added to all links. You can wrap your coding with [code][/code] to make use of built-in syntax highlighter.