Is the Syntax of .HTACESS correct?

Discussion in 'Site & Server Administration' started by bushib, May 14, 2008.

  1. #1
    hi there,

    I want to know that is the syntax of the .htaccess file is correct to solve the canonical issue i.e www and non www versions of the site.

    <IfModule mod_rewrite.c>
    
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^domainname\.com$ [NC]
    RewriteRule ^(.*)$ http://www.domainname.com/$1 [R=301,L]
    
    </IfModule>
    HTML:
    Regards
    bushib
     
    bushib, May 14, 2008 IP
  2. calum

    calum Peon

    Messages:
    2,821
    Likes Received:
    141
    Best Answers:
    0
    Trophy Points:
    0
    #2
    That is what I use, works fine.
     
    calum, May 15, 2008 IP
  3. bushib

    bushib Banned

    Messages:
    1,096
    Likes Received:
    10
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hi,

    Ok, thanks

    Now it's working.

    Regard
    bushib
     
    bushib, May 15, 2008 IP