Sir i want to redirect non www to www site but not working

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

    help Sir i want to redirect non www to www site but not working

    I have uploaded my .htaccess files please help me
    Attached Files

    #2
    I also used
    RewriteCond %{HTTP_HOST} ^example.com$ RewriteRule (.*) http://www.example.com$1 [R=301,L] but it makes error in path

    Comment


      #3
      did you put it after turning on mod rewrite?

      Comment


        #4
        i also need htaccess code which will redirect my site example.com
        to www.example.com when my site viewed..

        Comment


          #5
          Originally posted by daizu View Post
          i also need htaccess code which will redirect my site example.com
          to www.example.com when my site viewed..
          PHP Code:
          RewriteEngine On
          RewriteCond 
          %{HTTP_HOST} ^example\.com$ [NC]
          RewriteRule ^(.*)$ http://www.example.com/$1 [R=301,L] 

          Comment

          Working...
          X