Esküvő

Redirect www to non www with .htaccess RewriteRule

Google Analytics handles www.domain.com and domain.com as two different websites. So, you might get lower visitor statistics. To fix this, you can redirect all www to non www with .htaccess RewriteRule.

Let's get started. Open Notepad or any plain text editor.
Insert this code to your file and save it as .htaccess without any extension:

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

The final step is to upload this .htaccess file to your website root folder.


Esküvő


Related articles

Unordered List Style Image CSS

Unordered List Style Image CSS

06/03/2013

Learn how to style UL with any image using CSS.

OL and UL List CSS Style

OL and UL List CSS Style

03/03/2013

Styling ordered and unordered lists is easy. Just write a single line of CSS to change the list style type.

Email Validation

Email Validation

08/02/2013

Learn how to validate email on client side with HTML5, Javascript and on server side with PHP.


Leave a comment

We welcome any comment from you! Please keep in mind that comments are moderated and rel='nofollow' is in use. So, please do not use a domain as your name or a spammy keyword, or your comment will be deleted.

Name: *

E-mail: *

Message: *

Click on the flower *


Find us on Facebook

Tags

Esküvő

Back to Top