htaccess, quick question

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

  1. bigfred

    bigfred Power Member

    Joined:
    Mar 15, 2009
    Messages:
    745
    Likes Received:
    144
    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 Supreme Member

    Joined:
    Oct 1, 2008
    Messages:
    1,223
    Likes Received:
    732
    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:
    745
    Likes Received:
    144
    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.