1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

htaccess, quick question

Discussion in 'White Hat SEO' started by bigfred, Oct 7, 2010.

  1. bigfred

    bigfred Power Member

    Joined:
    Mar 15, 2009
    Messages:
    743
    Likes Received:
    143
    I am doing a 301 redirect. In the .htacess file, do I need to put anything before the redirect, or can i just put this is and nothing else?

    redirect 301 / http://www.newsite.com/

    or do I need RewriteEngine On and any other bits?
     
  2. thedorf

    thedorf Senior Member

    Joined:
    Oct 1, 2008
    Messages:
    1,193
    Likes Received:
    700
    Occupation:
    what? I gotta have a job?
    Location:
    BHW - Where else?
    Try and see if it redirects both ways. I do think you need the Rewrite Engine On prior though. Let us know what works...
     
  3. bigfred

    bigfred Power Member

    Joined:
    Mar 15, 2009
    Messages:
    743
    Likes Received:
    143
    I have added the Rewrite Engine and tried and without. Both work for me. However I want to get it correct so the search engines dont get upset. Was wondering what the correct way was
     
  4. Crixus

    Crixus Regular Member

    Joined:
    Jul 10, 2010
    Messages:
    409
    Likes Received:
    119
    Occupation:
    Jack of all trades, master of a couple.
    Location:
    the ludus
    As long as it works it doesn't matter. The SEs have no idea what is in the htaccess, that is a server side file.