nrewbie requesting critique of our .htaccess file contents

Discussion in 'Apache' started by Jim Redfield, Aug 1, 2012.

  1. #1
    We're overhauling our simple .HTML site and making a lot of page changes, mostly to bring the site into 21st century CSS (we're a 34 year old company). Some of our old pages have acquired a fair amount of traction in Google for various terms and we'd like to preserve those ranking as much as possible.

    But we're newbies with Apache (FYI, the version provided by our site host, 1and1) and not at all confident we have the right code structures for our .htaccess file to make the old-to-new page transitions correct and Google-friendly. The best we came up with is below - if someone could critique what we have, maybe suggest other stuff we should do, it would be very helpful. Thanks in advance. - Jim

    ...do we need/should we have the code below (or similar) at the top of the file?

    Options +FollowSymLinks (...is the "+" mark appropriate?)
    RewriteEngine on

    ...would the code below correctly morph all reasonable variations of "www.griffinchaseoliver.com" (for example, "griffinchaseoliver.com," and "www.GriffinChaseOliver.com") into that name, for Google-consistency?

    RewriteCond %{HTTP_HOST} *!^www*.griffinchaseoliver\.com [NC]
    RewriteRule (.*) http://www.griffinchaseoliver.com/$1 [L,R=301]

    ...would the code below correctly redirect from "www.griffinOliver.com/oldPage.html" to "www.griffinchaseoliver.com/newPage.html"? (Am I right that [NC] means the code will operate on "OLDpage.html" as well as "oldPage.html?"

    Redirect 301 /oldPage.html [NC] http://www.griffinchaseoliver.com/newPage.html

    ...would the code below send the page request to the site's home page?

    Redirect: "http://www.griffinchaseoliver.com/seo/oldPage.html"
    To: http://www.griffinchaseoliver.com/ (...would "...com/index.html" be better?)

    Again, your help very much appreciated. - Jim
     
    Jim Redfield, Aug 1, 2012 IP
  2. cesurasean

    cesurasean Active Member

    Messages:
    269
    Likes Received:
    3
    Best Answers:
    0
    Trophy Points:
    80
    #2
    You may want to use a Redirect for a custom 404 page......
     
    cesurasean, Aug 1, 2012 IP
  3. Jim Redfield

    Jim Redfield Peon

    Messages:
    2
    Likes Received:
    0
    Best Answers:
    0
    Trophy Points:
    0
    #3
    Cesurasean - Thanks, we're planning on doing that. - Jim
     
    Jim Redfield, Aug 3, 2012 IP