301 redirect from www to http://

Discussion in 'Search Engine Optimization' started by bex, Aug 10, 2009.

  1. #1
    Hi

    I am doing a 301 redirect from www to http:// is this the right code in the .htaccess :


    Options +FollowSymLinks
    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^http://www.admiral-scaffolding.co.uk$ [NC]
    RewriteRule ^(.*)$ http://admiral-scaffolding.co.uk$1 [R=301,L]

    many thanks
     
    bex, Aug 10, 2009 IP
  2. Bagi Zoltán

    Bagi Zoltán Well-Known Member

    Messages:
    364
    Likes Received:
    23
    Best Answers:
    0
    Trophy Points:
    110
    #2
    
    Options +FollowSymlinks
    RewriteEngine on
    RewriteCond %{HTTP_HOST} .
    RewriteCond %{HTTP_HOST} !^admiral-scaffolding\.co\.uk
    RewriteRule ^(.*)$  http://admiral-scaffolding.co.uk/$1 [R=301,L]
    
    Code (markup):
     
    Bagi Zoltán, Aug 11, 2009 IP
  3. GMBRDILOS

    GMBRDILOS Well-Known Member

    Messages:
    573
    Likes Received:
    6
    Best Answers:
    0
    Trophy Points:
    130
    #3
    Here I just posted http://forums.digitalpoint.com/showthread.php?p=12205373#post12205373
     
    GMBRDILOS, Aug 11, 2009 IP