301 Redirect Question

Discussion in 'Search Engine Optimization' started by jooles, Aug 7, 2007.

  1. #1
    My question is what is the ,nc on the 3rd line of code for? I have mine without it and it works fine. Should I add the ,nc? If so why?

    RewriteEngine on
    rewritecond %{http_host} ^domain.com [nc]
    rewriterule ^(.*)$ http://www.domain.com/$1 [r=301,nc]


    :D Thanks! :D
     
    jooles, Aug 7, 2007 IP
  2. Kommunicate

    Kommunicate Peon

    Messages:
    60
    Likes Received:
    1
    Best Answers:
    0
    Trophy Points:
    0
    #2
    NC = No Case or the regex will make a case-insensitive comparison.
     
    Kommunicate, Aug 7, 2007 IP
  3. trichnosis

    trichnosis Prominent Member

    Messages:
    13,785
    Likes Received:
    333
    Best Answers:
    0
    Trophy Points:
    300
    #3
    yeah, you must add that to your redirect code.
     
    trichnosis, Aug 8, 2007 IP