RSS

Redirecting non WWW url to WWW

13 Dec

RewriteEngine On

RewriteCond %{HTTP_HOST} ^example\.com$ [NC]

RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301]

The above rule will redirect example.com to http://www.example.com, It works believe me! 😉

Advertisements
 
1 Comment

Posted by on December 13, 2012 in Uncategorized

 

One response to “Redirecting non WWW url to WWW

  1. lista de email

    December 13, 2012 at 6:13 pm

    every time i come here i am not disappointed. nice post. lista de email lista de email lista de email lista de email lista de email

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

 
%d bloggers like this: