301 redirect in .htacess

Discussion in 'Site & Server Administration' started by AdamFL, Jan 16, 2010.

  1. #1
    Hello, I forwarded all www to non www using the code below:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} !^mywebsite\.com$
    RewriteRule (.*) http://mywebsite.com/$1 [R=301,L]
    Code (markup):
    I want to make sure i made the right redirect so I can still get some links juice from www. is this redirect is good?
    Thanks
     
    AdamFL, Jan 16, 2010 IP
  2. tolra

    tolra Active Member

    Messages:
    515
    Likes Received:
    36
    Best Answers:
    1
    Trophy Points:
    80
    #2
    Looks correct to me.
     
    tolra, Jan 16, 2010 IP
  3. Hostwaresupport

    Hostwaresupport Guest

    Messages:
    13
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Hello,

    Yep, it is correct rule. However, you can check logs if it is tossing any error.

    Thanks
     
    Hostwaresupport, Jan 17, 2010 IP