This lesson will show you how the domain redirect non www to www using .htaccess file. users entering your domain the address bar they won't enter www at start of the domain at that your domain want to redirect non www to www we write some code in .htaccess file. let's start the lesson.

.htaccess file
when ever you use .htaccess file you should start with RewriteEngine On.RewriteEngine On RewriteCond %{HTTP_HOST} domainname\.com [NC] RewriteRule (.*) http://www.domainname.com/$1 [L,R=301]
No comments :
Post a Comment